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
Q8: Insert the missing code in the following
Q9: Which of the following is the correct
Q10: Insert the missing code in the following
Q11: Which of the following objects should be
Q12: Which of the following statements about reading
Q14: Under which condition will the PrintWriter constructor
Q15: Consider the following code snippet: public static
Q16: The PrintWriter class is an enhancement of
Q17: Insert the missing code in the following
Q18: Insert the missing code in the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents