Answers for "how to clear a file in 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 a file in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language