What is the difference between overloading and overriding a
function?

Answer Posted / praveen

Over riding also can be happens in the same class

eq :-

public void test(int i)
{
System.out.println(i);
}
public void test(String i)
{
System.out.println(i);
}

Over Loading - Compile time polymorphism
Over Riding - Run time polymorphism

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to add menushortcut to menu item?

736


Why are variables important in research?

727


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

772


What are the advantages of arraylist over arrays?

784


What is the final keyword?

750


What is the class in java?

752


What do you understand by synchronization?

782


What is singleton service?

703


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

1059


Does google use java?

734


What is the collection interface?

775


What is difference between word and integer?

797


How to sort elements in a parallel array in java?

677


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

759


What is the difference in between cpp and java? Can u explain in detail?

826