Solved

Consider the Following Code Snippet

Question 36

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents