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
What is the driver class?
Explain the polymorphism principle?
Give a brief description of java socket programming?
What is scope of a variable?
What are the difference between composition and inheritance in java?
What is a data structure java?
what is the purpose of "virtual"?
What is a Presistent Object?
What does main method?
how to create multithreaded program? : Java thread
Difference between vector and arraylist.
What is use of static method?
What is lifetime variable?
can rmi and corba based applications interact ?
Is java code slower than native code?