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
Can we define a package statement after the import statement in java?
Explain the usage of this with constructors?
Why hashmap is used in java?
What does java se mean?
What does t in java mean?
What is the private method modifier?
What is JVM and is it platform independent?
What happens if we don’t define serial version uid?
Describe what a thread-local variable is in java?
How is tree Mirroring implemented?
What is the exact difference in between Unicast and Multicast object?
Can we change the value of static variable?
What is a buffer in java?
Does A Class Inherit The Constructors Of Its Superclass?
What is the basic of java?