Welcome Guest | Sign in | Register
Exceptions - Discussion Page For Q.2624 | 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”);
 }
}
Output?
A. one    B. runtime error
C. compile time error D. none of the above

Answer and Explanation

Answer:compile time error

Explanation:
If you write a try block there should be a catch block or finally block, if there is no catch or finally 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.