Yes ..
it has to be simply
Scanner filescan = new Scanner(new File("inputdata.txt"));
FYI :
Scanner is from - java.util.Scanner
A simple text scanner which can parse primitive types and strings using regular expressions.
A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace. The resulting tokens may then be converted into values of different types using the various next methods.
For example, this code allows a user to read a number from System.in:
Scanner sc = new Scanner(System.in);
int i = sc.nextInt();
"The most important single aspect of software development is to be clear about what you are trying to build." - Bjarne Stroustrup