0
Why input file not found ?
File InputFile1 = new File("output.in.txt"); if (!InputFile1.exists()) { System.out.println("Input File not Found !!"); System.exit(0); }else if (InputFile1.exists()) { System.out.println("found"); }
1 Odpowiedź
0
because new File is just an object for store infomation about a file, not the file itself.
public static void main(String[] args) throws IOException {
File InputFile1 = new File("output.in.txt");
InputFile1.createNewFile();
https://code.sololearn.com/cZ1Xc38SjXKK/#java