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

Home > Java Programming > Exceptions > Questions and Answers

Q: try{
File f = new File("a.txt");
}catch(Exception e){
}catch(IOException io){
}

Does this code create new file name a.txt ?
A. True B. False
C. Compilation Error D. None

Answer and Explanation

Answer:Compilation Error

Explanation:
IOException is unreachable to compiler because all exception is going to catch by Exception block.

Comment on this Question

Name:

Loading...




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