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 / sunita
Overriding methods cannot change the signature of the
overridden method. but runtime exception r not present in
signature so u can only add the runtime exception in
overriden method.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is instance example?
Give me an example of array and linked list? Where they can be used?
What is a values collection view ?
What is length in java?
Can a constructor have different name than a class name in java?
What is difference between overloading and overriding in java?
What is constructor chaining in java?
Write a code to show a static variable?
What is the purpose of the strictfp keyword?
Why deletion in linkedlist is fast than arraylist?
What are the three parts of a lambda expression? What is the type of lambda expression?
Is there a jre for java 11?
How do you invoke a method?
Are arrays primitive data types?
What is difference between iterator access and index access?