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 / sunita
Overriding methods cannot change the signature of the
overridden method. but runtime exception r not present in
signature so u can only add the runtime exception in
overriden method.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is illegal identifier in java?
Why charat is used in java?
Is an integer an object?
Can we convert stringbuffer to string?
Can java inner class be static?
why are there separate wait and sleep methods? : Java thread
When is an object subject to garbage collection?
Which is better stringbuffer or stringbuilder?
What is the difference between delete and delete[]
What does nullpointerexception mean?
What is singleton class in java and how can we make a class singleton?
Why do we need data serialization?
How do I know if java is installed?
How does java enable high performance?
What is a nested class?