What is the difference between overloading and overriding a
function?

Answer Posted / suganthi

Over Loading : when two or methods share the same name but
paramater declaration are diffierent with in a class.
(ex:Compile time polymorpism)

Over ridding: when two or methods share the same name but
paramater declaration are also same in different classes.
(ex:run time polymorpism)

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between comparator and comparable in java?

842


How destructors are defined in java?

882


What is a protected class in java?

749


What if static is removed from main method?

777


What is output buffer?

777


What is the numeric promotion?

695


What is the concept of multithreading?

718


What is the locale class in java programming?

741


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

732


What is a variable analysis?

825


How can we make copy of a java object?

765


What is size_t?

703


If two threads have same priority which thread will be executed first ?

1129


Can you call one constructor from another if a class has multiple constructors?

782


what is the difference between a threads start() and run() methods? : Java thread

752