Java PrintWriter not working
Close your PrintWriter in a finally block to flush it and to reclaim resources public void writeToFile(String fileName) { // **** Note that pW must be declared before the try block PrintWriter pW = null; try { pW = new PrintWriter(new File(fileName)); for (int x = 0; x < 25; x++) { for (int y … Read more