Multiple Choice Question

Quiz Guidelines

 

QID: 
256
Question: 

Consider the following code snippet:

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()

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!