InterviewSolution
Saved Bookmarks
| 1. |
Which among the following is true?(a) If catch block of base class is written first, it is compile time error(b) If catch block of base class is written first, it is run time error(c) If catch block of base class is written first, derived class catch block can’t be reached(d) If catch block of base class is written first, only derived class catch block is executedI got this question in an interview.This interesting question is from Catching Class Types in division Exception Handling & Static Class Members of Object Oriented Programming |
|
Answer» The correct choice is (c) If catch block of base CLASS is WRITTEN FIRST, DERIVED class catch block can’t be reached |
|