Consider the following code snippet.
Scanner inputFile = new Scanner("dataIn.txt") ;
Which of the following statements is correct?
A) This code will not open a file named "dataIn.txt", but will treat the string "dataIn.txt" as an input value.
B) This code will open a file named "dataIn.txt" for writing.
C) This code will create a new file named "dataIn.txt".
D) This code will open an existing file named "dataIn.txt" for reading.
Correct Answer:
Verified
Q31: Assuming that inputFile is a Scanner object
Q32: Which of the following statements about character
Q33: Your program wishes to open a file
Q34: Which return value of the JFileChooser object's
Q35: Consider the following code snippet.
PrintWriter outputFile =
Q37: Your program must read in an existing
Q38: Which of the following statements about reading
Q39: Which Java class implements a file dialog
Q40: Consider the following code snippet.
Q41: Consider the following code snippet.
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