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


Please Help Members By Posting Answers For Below Questions

What is a vector in java?

570


What are the topics in core java?

527


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

1899


Why is static used?

541


What do you mean Abstraction in java?

603






how to one war file class to another war file class?

1552


What is jpa specification?

534


does java support pointers?

558


What is meant by distributed application? Why are we using that in our application?

543


What is the primitive type short?

573


Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..

1812


What is string and its types?

605


What exactly is java?

506


what do you mean by stream pipelining in java 8? Explain

528


Will set allow duplicates in java?

497