check if file present in java code example
Example: java check if file exists
import java.io.File;
File tmpDir = new File("/var/tmp");
boolean exists = tmpDir.exists();
import java.io.File;
File tmpDir = new File("/var/tmp");
boolean exists = tmpDir.exists();