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 do you mean by classloader in java?

575


Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.

2282


What is int short for?

516


Difference between vector and arraylist.

585


What is the use of jtable?

652






What is t in generics in java?

563


What is the use of set in java?

612


What is the basic concept of java?

541


What is the function of http?

535


What differences exist between iterator and listiterator?

573


What are the methods of object class ?

563


Why collection doesn’t extend cloneable and serializable interfaces?

645


What is the difference between keyword and identifier?

537


How does multithreading take place on a computer with a single cpu?

544


What do you mean by boolean?

580