What is the output of this snippet?

Last Updated :
Discuss
Comments

What is the output of this snippet?

Java
File f = new File("log.txt");
System.out.println(f.exists());


true if file exists

Always true

Always false

Compilation error

Share your thoughts in the comments