31. The class at the top of exception class hierarchy is .................
32. In which of the following package Exception class exist?
33. Exception generated in try block is caught in ........... block.
34. Which keyword is used to explicitly throw an exception?
35. Which exception is thrown when divide by zero statement executes?
36. Which keyword is used to specify the exception thrown by method?
37. Which of the following blocks execute compulsorily whether exception is caught or not.
38. What happen in case of multiple catch blocks?
39. Which exception is thrown when an array element is accessed beyond the array size?
40. What is the output of the following program code?
public class Test{
public static void main(String args[]){
try{
int i;
return;
}
catch(Exception e){
System.out.print("inCatchBlock");
}
finally{
System.out.println("inFinallyBlock");
}
}
}
public class Test{
public static void main(String args[]){
try{
int i;
return;
}
catch(Exception e){
System.out.print("inCatchBlock");
}
finally{
System.out.println("inFinallyBlock");
}
}
}
Read More Section(Exceptions)
Each Section contains maximum 100 MCQs question on Exceptions. To get more questions visit other sections.