what is the purpose of method overriding in java where v r
completely re-defining a inherited method instead y can't v
create a new method and define.If the question is very silly
plz excuse me and do reply.Thank U!

Answer Posted / imambasha

hi
MethodOverriding is the concept which implements Dynamic
Code(Method) binding.
i.e., The method which is going to bind or execute is
decided at the runtime basing on the Object that we are
using to call that method...
Suppose assume we have two Classes A,B Where class B is
inheriting class A.And even we have overridden(given
different implementation with same method signature)a
method of class A in class B.
Now the criteria is which method(superclass method or
subclsas overridden method) is to be called or executed is
determined based on the object(class A object Or class B
object) we are using to call that method............

Is This Answer Correct ?    9 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does it mean to be immutable?

534


How do you find the independent variable?

498


What is boolean strategy?

614


What are the differences between heap and stack memory?

537


When do we need to use internal iteration? When do we need to use external iteration?

591






What is the concatenation operator in java?

562


What is ctrl m character?

505


What is an iterator java?

519


Which is better 64 bit or 32 bit?

493


What is difference between throw and throws ?

584


When should a function throw an exception?

584


Is a string literal?

511


What is the purpose of methodology?

625


I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in

1583


What is a void in java?

566