Which among the following is true for class exceptions?

Which among the following is true for class exceptions?
A. Only base class can give rise to exceptions
B. Only derived class can give rise to exceptions
C. Either base class or derived class may produce exceptions
D. Both base class and derived class may produce exceptions
 
Answer: d
Explanation: It’s not mandatory that either base class or derived class can give rise to exceptions. The exceptions might get produced from any class. The exceptions depends on code.
 

Tìm kiếm

Back
Top