explain method overridding method overloding with examples?
Answer Posted / muthusenthil
method overloading is to load some extra features in
existing method eg: a method takes string as an arguments
but overloaded method may take int along with String
trapPerson(String name)- pre-existing method
trapPerson(String name,int age)- overloaded method
(irrespective of return type)
this may take place in same class or derived clas
method overridding is to override a method from parentclass
to change its behaviour.name should be same as parentclass
method, behaviour may change
it should takes place between derived class
eg: class man extends superman
int walk() be one among characterstics of man overridden by
superman.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
How many instances of servlet usually run in a struts application ?
Explain struts.devmode?
What configurations are stored in struts configuration file ?
What are the core classes of the struts framework?
How to explain Software Bank Loan descriptions
What is difference between spring and struts?
How do you convert struts to springs?
What are action errors and error and what are the consequences they impose?
What are action classes in struts?
Explain about the future of struts?
What is the purpose of @result?
How to use dispatchaction?
How struts control data flow?
Does apache tomcat use struts?
What is struts2 namespace?