Question:SQLException has a feature of chaining - identify the right code to execute the same from the following options: 

A catch(SQLException e) { out.println(e.getMessage()); while((e=e.getNextException())!=null) { out.println(e.getMessage()); } } 

B catch(SQLException e) { out.println(e.getNextException()); while((e=e.getMessage())!=null) { out.println(e.getMessage()); } } 

C catch(SQLException e) { out.println(e.getMessage()); while((e=e.getEncapsulatedException())!=null) { out.println(e.getMessage()); } } 

D catch(ClassNotFoundException e) { out.println(e.getMessage()); while((e=e.getNextException())!=null) { out.println(e.getMessage()); } } 

E catch(ClassNotFoundException e){ { out.println(e.getMessage()); } } 

+ Answer
+ Report
Total Preview: 1492

Copyright © 2024. Powered by Intellect Software Ltd