Multiple Choice
Insert the missing code in the following code fragment. This fragment is intended to read an input file.
Public static void main(String[] args) __________________
{
String inputFileName = "dataIn.txt";
File inputFile = new File(inputFileName) ;
Scanner in = new Scanner(inputFile) ;
) . .
}
A) extends FileNotFoundException
B) throws FileNotFoundException
C) inherits FileNotFoundException
D) catches FileNotFoundException
Correct Answer:

Verified
Correct Answer:
Verified
Q20: Which method of an exception object will
Q30: Consider the following code snippet. Scanner inputFile
Q34: Which String class method will remove spaces
Q37: Consider the following code snippet:<br>Throw new IllegalArgumentException("This
Q41: Insert the missing code in the following
Q60: Consider the following code snippet. PrintWriter outFile
Q62: Insert the missing code in the following
Q93: Which of the following statements reflects the
Q94: An example of a fatal error that
Q106: Which of the following statements about checked