Solved

Consider the Following Code Snippet

Question 86

Multiple Choice

Consider the following code snippet. Scanner inputFile = new Scanner("hoursWorked.txt") ;
Which of the following statements is correct?


A) This code will treat the string "hoursWorked.txt" as an input value.
B) This code will create a new file named "hoursWorked.txt".
C) This code will open an existing file named "hoursWorked.txt" for reading.
D) This code will open a file named "hoursWorked.txt" for writing.

Correct Answer:

verifed

Verified

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

Related Questions