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 / jeevan
It is a good programming practice to have only a sub set of
checked exceptions classes from the throws clause of the
inherited method of the superclass.
Here in the above example E2,E3 exception are not a subset
of the exception classes of the inherited method
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain about the select method with an example?
Is null a value?
Can anonymous class have constructor?
What does a method signature consist of?
What type of variable is gender?
How to sort array in descending order in java?
Which types of exceptions are caught at compile time?
Explain the importance of thread scheduler in java?
What is an immutable class? How to create an immutable class?
What are streams in java 8?
What is the applet security manager, and what does it provide?
Are arrays passed by reference in java?
What is meant by class and object in java?
What are controls and their different types in awt?
What is string [] java?