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


Please Help Members By Posting Answers For Below Questions

What is the difference between stream and buffer?

518


Is there any sort function in java?

579


What is starvation?

685


Explain differences between checked and unchecked exceptions in java?

643


What is primitive array?

524






Write a program to check for a prime number in java?

563


Can we assign null to double in java?

552


Are constructors methods?

569


Difference between abstract and concrete class ?

583


What do bitwise operators do?

530


How many bits is a string in java?

580


Can you use this() and super() both in a constructor?

523


What is the difference between Java and C++?

615


How do you implement tree mirroring in java?

597


Difference between arraylist and vector.

594