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

Verified
Correct Answer:
Verified
Q5: When writing a method, which of the
Q13: Consider the following code snippet:<br>If (in.hasNextDouble())<br>{<br>Number =
Q41: Which return value of the JFileChooser object's
Q66: Which of the following statements about reading
Q72: Consider the following code snippet:<br>Try<br>{<br>PrintWriter outputFile =
Q78: Consider the following code snippet: Scanner in
Q79: Which of the following statements about a
Q83: Consider the following code snippet: File inputFile
Q89: Which of the following statements about reading
Q91: Under which condition will the Scanner constructor