-5

A program that I am making will access words.txt file. How do I programmatically check if that file exists using java.io?

Eddie
  • 65
  • 2
  • 8

1 Answers1

0

Use File.exists()

File f = new File("filepath");
System.out.println(f.exists());
Gurwinder Singh
  • 37,207
  • 6
  • 50
  • 70