Welcome Guest | Sign in | Register
Exceptions - Discussion Page For Q.2616 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Exceptions > Questions and Answers

Q: class A{
public static void main(String args[]){
try{
System.out.println(“one”); 
}
System.out.println(“four”);
catch(Exception e){
System.out.println(“two”);
}finally{
System.out.println(“three”); }
}
}
A. one ,four , two , three B. one , four , three
C. one , three D. compile time error

Answer and Explanation

Answer:compile time error

Explanation:
In any program as soon as you complete try block you have to start catch block or finally block, in between if you try to write anything it will throw compile time error.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved 2012-2015 SoftLucent.