You are not logged in.

#1 2015-06-15 06:46:19

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Java Language Exceptions Quiz:

Java Quizzes Java Language Exceptions

Directions:
1.  try{
2.       //some code goes here
3.  }
4.  catch(NullPointerException ne){
5.       System.out.print("1 ");
6.  }
7.  catch(RuntimeException re){
8.       System.out.print("2 ");
9.  }
10. finally{
11.      System.out.print("3");
12. }

Question:
What will be the result if NullPointerException occurs at line 2?

Option A):
1 2
Option B):
1 1
Option C):
1 3
Option D):
2 3 4

Correct Answer is Option C):
1 3


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-06-15 06:46:19

Advertisement
Ads By Google

Re: Java Language Exceptions Quiz:



\n

Board footer