Hi Friends..


can any one provide the real time example for
methodoverloading and methodoverriding .........

Answer Posted / aravind

Example Method:

public void method(int a)
{
....;
....;
}

Method Overloading:
class
{
method(140,1,10,250);
}

Method Overriding:
re implement same method in a class with same or additional
attributes.

method()
{
...;
}

Is This Answer Correct ?    0 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the use of bean managed and container managed with example?

1722


Can we use String with switch case?

850


What are the differences between include directive and include action?

758


What is procedure writing?

687


What are the restriction imposed on a static method or a static block of code?

802


Can set contain duplicates?

759


What is a conditional statement explain with example?

751


What is the difference between size and length in java?

724


What is difference between null and void?

722


Why we used break and continue statement in java?

774


Can we make the abstract methods static in java?

781


What is private public protected in java?

793


What is matcher in java?

718


How do I start learning java?

771


Is java 9 released?

727