SyntaxFix
Write A Post
Hire A Developer
Questions
Why not just use:
File file = new File("test.txt"); if (file.length() == 0) { // file empty } else { // not empty }
Is there something wrong with it?