How can I delete the content of a file in Java?
How about this:
new RandomAccessFile(fileName).setLength(0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!