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 = new File(inputFileName) ;
Scanner in = _________;
) . .
}
A) new File(inputFileName)
B) new File("dataIn.txt")
C) new Scanner(inputFile)
D) new Scanner("dataIn.txt")
Correct Answer:

Verified
Correct Answer:
Verified
Q41: Which return value of the JFileChooser object's
Q42: Insert the missing code in the following
Q43: Consider the following code snippet: Scanner in
Q44: Consider the following code snippet: try<br>{<br>PrintWriter outputFile
Q45: Insert the missing code in the following
Q47: Consider the following code snippet. File inputFile
Q48: Which method of the JFileChooser object will
Q49: Insert the missing code in the following
Q50: In the hierarchy of Exception classes, the
Q51: Insert the missing code in the following