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
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
What are the main uses of this keyword?
Explain different ways of creating a thread?
What does system.gc() and runtime.gc() methods do?
What is member in java?
Can private class be extended java?
Can constructor return value?
Is object a data type?
Is a method a function?
What is meant by 'Class access modifiers'?
Is java a pure object oriented language?
What are the 8 primitive data types in java?
Can abstract class have private constructor?
Which class is used by server applications to obtain a port and listen for client requests?
What is difference between class and object in java?