Check if a file exists in Java


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. File f = new File(args[0]);
  2. if (f.exists()) {
  3. } else {
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.