what is mean by overriding in which situation we wil use?
Answer Posted / shahbaz ali
According to J2ee Compleet reference java:
I Think the answer is that
Overriding means the : In inheritance If we Declare the
(Public of default) Method in the superclass Similarly we
declare the method with the same name ,Same type,same
number of parameters.but the Body of the method May
different When We Instansiate child class and access it
then child's method will called if u want to call super's
overriden method then use the [super()] method to access it
in child for this read [Java compleete reference's
Chapter#8] u will find reasonable answer
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Can we have multiple classes in single file ?
What is remote method invocation (rmi)?
What is difference between static and final?
worst case complexities of Quick sort and Merge sort.
How do you test a method for an exception using junit?
What do you understand by garbage collection in Java? Can it be forced to run?
What is Gang of four design patterns
Does a class inherit the constructors of its superclass in java programming?
What is static in java?
What are the main uses of this keyword?
When do we use synchronized methods in java?
How to make a class or a bean serializable?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
What is difference overloading and overriding?
Why wait and notify methods are declared in object class?