R

Ravi Shankar • 4.19K Points
Extraordinary

Q. 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");
}
}
}

  • (A) inCatchBlock
  • (B) inCatchBlock inFinallyBlock
  • (C) inFinallyBlock
  • (D) The program will return without printing anything
  • Correct Answer - Option(C)
  • Views: 33
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics