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

Home > Java Programming > File > Questions and Answers

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

Is 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.