Here you can find the source of exists(String fileName)
public static boolean exists(String fileName)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static boolean exists(String parent, String fileName) { return new File(parent, fileName).exists(); }//from w w w .jav a 2s . c o m public static boolean exists(String fileName) { return new File(fileName).exists(); } }