void m1() throws Exception{
try{ // line1
}catch (IOException e){
throw new SQLException();
}catch(SQLException e){
throw new InstantiationException();
}finally{
throw new CloneNotSupportedException(); // this is not a RuntimeException.
}
}
Which of the following statements are true?
Select 2 options
A. If IOException gets thrown at line1, then the whole method will end up throwing SQLException.
B. If IOException gets thrown at line1, then the whole method will end up throwing CloneNotSupportedException.
C. If IOException gets thrown at line1, then the whole method will end up throwing InstantiationException()
D. If no exception is thrown at line1, then the whole method will end up throwing CloneNotSupportedException.
E. If SQLException gets thrown at line1, then the whole method will end up throwing InstantiationException()
If you want to solve the questions together with the experts and understand the concepts better, please contact us using the contact form or WhatsApp numbers. Selected people get to do that without any additional charges.