Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- public class Main {
- private static String filePath = "file.txt";
- public static void main (String[] args){
- File myFile = new File(filePath);
- if(myFile.exists()){
- System.out.println("Il file non esiste");
- }
- else{
- System.out.println("Il file esiste");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment