Multiple Choice
Insert the missing code in the following code fragment. This fragment is intended to read an input file.
Public static void main(String[] args) throws FileNotFoundException
{
String inputFileName = "dataIn.txt";
String outputFileName = "dataOut.txt";
File inputFile = new File(inputFileName) ;
Scanner in = _______________;
) . .
}
A) new Scanner(inputFileName)
B) new Scanner(outputFileName)
C) new Scanner(inputFile)
D) new Scanner(System.in)
Correct Answer:

Verified
Correct Answer:
Verified
Q11: Consider the following code snippet: Scanner in
Q28: Consider the following code snippet:<br>Throw IllegalStateException("This operation
Q31: Which of the following statements about exception
Q40: Which method of an exception object will
Q48: Which method of the JFileChooser object will
Q50: In the hierarchy of Exception classes, the
Q68: Your program must read in an existing
Q98: When you start a Java program from
Q103: When reading words using a Scanner object's
Q108: Consider the following code snippet: PrintWriter out