Answers for "clear data from 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 "Java"

Java Answers by Framework

Browse Popular Code Answers by Language