Declare a Scanner reference variable fileInput, and assign it a newly created Scanner object that is associated with a file named “data1”. (Do not concern yourself with any possible exceptions here– assume they are handled elsewhere.)
LANGUAGE: JAVA
CHALLENGE:
Declare a Scanner reference variable fileInput, and assign it a newly created Scanner object that is associated with a file named “data1”. (Do not concern yourself with any possible exceptions here– assume they are handled elsewhere.)
SOLUTION:
Scanner fileInput = new Scanner(new File("data1"));