Help with text based options

I am currently working on a program that will input a .txt file, read the numbers from there and calculate different things about it. I am struggling where the user inputs the data. I keep getting the error- Cannot find symbol - method exists(). I am trying to have the user enter in a file name, then the program checks if it is a file, if not it should go into a loop saying "invalid file" and re-prompts the user to enter their file name again. My code is pasted below, any suggestions?

System.out.println( " This program is designed to open a .txt file containing grades and display several statistics about the grades."); System.out.println(" " ); System.out.println( "The availible input files, where you may input grades are:" + " Grades.txt" + " Grades2.txt" + " Grades3.txt" + " Grades4.txt" + " Grades5.txt"); System.out.print( "Please enter the filename that contains the grades you wish to use from the list above: "); String file = input.nextLine();