What happens in a method if an exception is thrown in a try{} block and there is NO MATCHING catch{} block?

  1. This is not legal, so the program will not compile.

  2. The method throws the exception to its caller, exactly if there were no try{} block.

  3. The program halts immediately.

  4. The program ignores the exception.


Correct Option: B

Find more quizzes: