If you receive the following from DrJava "Warning: Resource leak:
'......' is never closed"
It is a warning / suggestion, not an error.
You may wish to add the following line as the last line of your program.
sc.close();
assuming sc is the scanner variable in your programs.
'......' is never closed"
It is a warning / suggestion, not an error.
You may wish to add the following line as the last line of your program.
sc.close();
assuming sc is the scanner variable in your programs.
No comments:
Post a Comment