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


Please Help Members By Posting Answers For Below Questions

What is illegal identifier in java?

527


Why charat is used in java?

534


Is an integer an object?

513


Can we convert stringbuffer to string?

561


Can java inner class be static?

553






why are there separate wait and sleep methods? : Java thread

571


When is an object subject to garbage collection?

572


Which is better stringbuffer or stringbuilder?

521


What is the difference between delete and delete[]

573


What does nullpointerexception mean?

609


What is singleton class in java and how can we make a class singleton?

562


Why do we need data serialization?

538


How do I know if java is installed?

513


How does java enable high performance?

686


What is a nested class?

586