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
What are data types in oop?
How to declare objects of a class ?
Which java collection does not allow null?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
Why put method is used?
Where import statement is used in a java program?
Which language is java?
What is number data type in java?
What is io stream in java?
Can we sort set in java?
How to perform bubble sort in java?
Explain different ways of creating a thread?
Explain method local inner classes ?
Can you give few examples of final classes defined in java api?
How objects are stored in java?