Examveda
Examveda

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

Answer: Option C

Solution(By Examveda Team)

IOException is unreachable to compiler because all exception are going to catch up by Exception block.


This Question Belongs to Java Program >> Input Output

Join The Discussion

Related Questions on Input Output