Solved

Consider the Following Code Snippet

Question 85

Multiple Choice

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions