Which of the following represents the correct syntax for re-throwing an exception.

  1. try {throw 3;} catch(int i){ rethrow; }

  2. try {throw 3; rethrow ;} catch(int i){}

  3. try {throw 3;} catch(int i){ rethrow 3; }

  4. try {throw 3;} catch(int i){ throw; }


Correct Option: D

Find more quizzes: