jac_usai

Untitled

Jun 16th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. import java.io.File;
  2.  
  3. public class Main {
  4.  
  5.     private static String filePath = "file.txt";
  6.  
  7.     public static void main (String[] args){
  8.  
  9.         File myFile = new File(filePath);
  10.  
  11.         if(myFile.exists()){
  12.             System.out.println("Il file non esiste");
  13.         }
  14.         else{
  15.             System.out.println("Il file esiste");
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment