Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- class FirstFile {
- public static void main(String args[ ]) {
- File f = new File("/home/asus/5.jpg");
- if(f.exists())
- System.out.println(f.getName() + " exists!");
- else
- System.out.println("There is no such file.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement