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 you run java program without main method?

550


What are the basic control structures?

504


What is JFC?

718


What are different types of expressions?

556


What is comparator in java?

562






which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

9263


What’s the difference between constructors and other methods?

536


What is a class object?

504


What is the numeric promotion?

509


What is the public field modifier?

547


What is use of static method?

540


How can we create objects if we make the constructor private ?

547


How does finally block differ from finalize() method?

591


What is variable and rules of variable?

520


how can you catch multiple exceptions in java?

546