A

Admin • 828.03K Points
Coach

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 of these
  • Correct Answer - Option(C)
  • Views: 20
  • Filed under category Java
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.