I tried to read a file using the java.io.File class but it was throwing filenotfound exception. But the file is there and when I use the exists method it returns false
public static void main(String[]args){
File file = new File("q.txt");
Scanner fileScanner = new Scanner(file);
}