explain method overridding method overloding with examples?
Answer Posted / esha prasad
Overriding:: It's not any two classes will do to study this
scnario, because overriding will come in a scenario
involving parent child relationship.
public class Parent{
public void sum(int a, int b)
{
System.out.println(a+b);
}
class Child extends Parent
{
public void sum(int a, int b)
{
System.out.println("Sum of the integers = "+a+b);
}
}
}
class MainClass
{
public static void main(String[] args) {
}
}
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Which servlet does the struts framework use?
How we can controlled duplicate form submission in struts?
How can we group related actions in one group in Struts?
What is apache struts used for?
What is struts and why it is used?
How action-mapping tag is used for request forwarding in struts configuration file?
How you will enable front-end validation based on the xml in validation.xml?
What do you mean by struts.dev mode?
Explain the complete struts validator framework.
What are the differences between http direct and http indirect?
What is filter dispatcher in struts?
Do we need to pay the struts if being used in commercial purpose?
What is difference between lookupdispatchaction and dispatchaction?
What is a custom tag?
What are the steps involved in creating a strut application?