Multiple Choice
Select an appropriate expression to complete the header for the method below. public void openFile(String inputFile) ______________________________
{
File theFile = new File(inputFile) ;
Scanner data = new Scanner(theFile) ;
// additional statements to input data from file
}
A) throw FileNotFoundException
B) throw new FileNotFoundException
C) throws FileNotFoundException
D) throws new FileNotFoundException
Correct Answer:

Verified
Correct Answer:
Verified
Q58: Under which condition will the PrintWriter constructor
Q59: Which of the following patterns should be
Q60: Consider the following code snippet. PrintWriter outFile
Q61: Complete the code fragment below, which is
Q62: Insert the missing code in the following
Q64: Select an expression to complete the program
Q65: You have opened a command prompt window
Q66: Which of the following statements about reading
Q67: Which of the following objects should be
Q68: Your program must read in an existing