Solved

Insert the Missing Code in the Following Code Fragment

Question 28

Multiple Choice

Insert the missing code in the following code fragment. This code is intended to open a file and handle the situation where the file cannot be found. try
{
String filename = . . .;
Scanner in = new Scanner(new File(filename) ) ;
) . .
}
___________________
{
Exception.printStackTrace() ;
}


A) catch (IOException exception)
B) catch (new exception (IOException) )
C) catch (IllegalArgumentException exception)
D) catch (IOException)

Correct Answer:

verifed

Verified

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

Related Questions