import java.io.*;
public class Test{
static void sop( Object obj){
System.out.println(obj);
}
public static void main(String args[]) throws Exception {
File f = new File("E:\\2.jpg");
if(f.exists()&&f.isDirectory()){ sop(" yes it'sdirectory");}
else if(f.exists()&&f.isFile()){sop("yes it's file");}
else sop("not exists");
}
public class Test{
static void sop( Object obj){
System.out.println(obj);
}
public static void main(String args[]) throws Exception {
File f = new File("E:\\2.jpg");
if(f.exists()&&f.isDirectory()){ sop(" yes it'sdirectory");}
else if(f.exists()&&f.isFile()){sop("yes it's file");}
else sop("not exists");
}