class A{
some variables;
public void a()throws Excepion1,Exception2{....}
}
class B extends A{
variables...
public void a()throws E2,E3{.....}
}
Qns:
here override of methods occurs or not,ore else wil give
any compilation error or run properly..plz tell me briefly
whts happening with the above codes....
Answer Posted / dipesh
this will throw complie error b'coz u r overirding the
method & u overirdng method cant throw exceptions which is
not being thrown by overirded method hwevr ovrindng method
can throw runtime exceptions
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
Give reasons supporting that string is immutable.
What is difference between this and super keyword?
What does isempty () do in java?
What is class and its types?
What is close method? How it's different from Finalize & Dispose?
What are different types of classloaders?
Can we write class inside a class in java?
Can we call virtual funciton in a constructor ?
Can you have two constructors in java?
If goto and const is reserve words than why it is not work in java?
What is the difference between abstract class and interface1? What is an interface?
What is this () in java?
What is the gregoriancalendar class in java programming?
State the main difference between c++ and java?
How do you implement polymorphism in our day to day life?