You are not logged in.
Pages:: 1
#1 2015-06-15 06:42:23
Prints out: Finally:
Java Quizzes Java Language Exceptions
Directions:
public class Test{
public void divide(int a, int b){
try{
int c = a / b;
}catch(Exception e){
System.out.print("Exception ");
}finally{
System.out.println("Finally");
}
public static void main(String args[]){
Test t = new Test();
t.divide(0,3);
}
}
Question:
What will be the result of executing the following code?
Option A):
Prints out: Exception Finally
Option B):
Compile with error
Option C):
Prints out: Exception
Option D):
Prints out: Finally
Correct Answer is Option D):
Prints out: Finally
You cannot discover the new oceans unless you have the courage to lose the sight of the shore.
Offline
2015-06-15 06:42:23
- Advertisement
- Ads By Google
Re: Prints out: Finally:
\n
Pages:: 1