Answers for "how to clear file contents java"

0

how to clear a text file in java

File file = new File("/path/to/file.txt");
PrintWriter writer = new PrintWriter(file);
writer.print("");
writer.close();
Posted by: Guest on May-05-2021

Code answers related to "how to clear file contents java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language