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

Can we sort list in java?

594


What is numeric data type?

519


What are java threads?

610


What is difference between string and new string?

528


What is java instanceof operator?

553






Does treeset allow null in java?

502


What is http client in java?

513


What is null in java?

517


What is the use of set in java?

604


What are advantages of using Java?s layout managers than windowing systems?

1850


What is variable in java?

514


How do weakhashmap works?

581


Can you give few examples of final classes defined in java api?

553


Is a string literal?

515


What is off heap memory?

541