Multiple Choice
Consider the following code snippet:
File inputFile = new File("input.txt") ;
You wish to read the contents of this file using a Scanner object.Which of the following is the correct syntax for doing this?
A) Scanner in = new Scanner("input.txt") ;
B) Scanner in = new Scanner(inputFile) ;
C) Scanner in = Scanner.open(inputFile) ;
D) Scanner in = Scanner("input.txt") ;
Correct Answer:

Verified
Correct Answer:
Verified
Q5: Which of the following statements about character
Q6: Insert the missing code in the following
Q7: Consider the following code snippet: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q8: Which method of an exception object will
Q9: Which of the following statements about exception
Q11: Consider the following code snippet.<br>File hoursFile =
Q12: Consider the following code snippet, assuming that
Q13: Consider the following code snippet, where data
Q14: Consider the following code snippet: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q15: Which of the following statements about checked