The JVM will close your file automatically if you instantiate its file handler in a try-with-resources header, like this (T / F):
public void writeToFile(String filename, String text) throws IOException{ PrintWriter fileOut; try (fileOut = new PrintWriter(new File(filename))) { fileOut.println(text); }} // end writeToFile
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.