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
What is multiple inheritance? Is it supported by java?
Explain the difference between string, stringbuffer and stringbuilder in java?
If two threads have same priority which thread will be executed first ?
How can you traverse a linked list in java?
What does exp mean in math?
What is instance synchronization?
Is it safe to install java on my computer?
What is the difference between multitasking and multithreading in Java
What comes to mind when someone mentions a shallow copy in java?
Explain java heap space and garbage collection?
What is a databasemetadata?
Difference between Preemptive scheduling vs. Time slicing?
How many digits is int32?
What are the advantages of assembly language?
What are peerless components?