I want user to choose his desired text file.
My code:
File file = new File("mytextfile.txt");
System.out.println("This is your file");
System.out.println(file);
FileInputStream fin = null;
try {
fin = new FileInputStream(file);
System.out.println(fin);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Why this is not working?
Thanks in advance