Java examples for File Path IO:File Operation
Use File object to check if a file exist
import java.io.File; public class Main { public static void main(String[] arg) { File f = new File("c:/myfile.txt"); if (!f.exists()) System.out.println("The input file does not exist!"); }/* w w w. ja va2 s. c o m*/ }