-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
  • 67
  • 1
  • 2
  • 8

1 Answers1

0

Use File.exists()

File f = new File("filepath");
System.out.println(f.exists());
Gurwinder Singh
  • 38,557
  • 6
  • 51
  • 76