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
How many days will it take to learn java?
What is meant by class?
Which class contains a method: cloneable or object?
What is sizeof in java?
What is the most important feature of java? What is an interface?
What do you know about the garbage collector in java?
What is difference between hashset and hashmap?
Is heap stored in ram?
What do u mean by variable?
Is there is any difference between a scrollbar and a scrollpane?
Is java a security risk?
What is java in detail?
What is the symbol for average?
What is data type example?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?