Question:Which of the following code snippets for catch shows a better way of handling an exception? 1. catch (Exception exc) { throw exc; } 2. catch (Exception exc) { throw; } 

A 1 is better as it maintains the call stack. 

B 2 is better as it maintains the call stack. 

C Both are same. 

D None of these. 

+ Answer
+ Report
Total Preview: 808

Copyright © 2024. Powered by Intellect Software Ltd