InterviewSolution
| 1. |
What Is The Error In The Following Code? |
|
Answer» 18. class PARENT{ Here parent class had declared IOException where as subclass has declared Exception. Exception is the super class of IOException thus it is WRONG according to the rules of method overriding and exception handling. Thus the code will give compiler error. 18. class Parent{ Here parent class had declared IOException where as subclass has declared Exception. Exception is the super class of IOException thus it is wrong according to the rules of method overriding and exception handling. Thus the code will give compiler error. |
|