Difference between overloading and Overriding. <Giving a
confusing example to test the concept.>
(also asked in PA Consultancy Group,iflex,Value
chain,IBM,CTS,Accenture, Tarang>

Answer Posted / esha prasad

Over loading is polymorphism implementation in same class,
where two or more methods can share same name differing in
parameters passed.
Overriding is polymorphism implementation in different
classes having parent child relationship and the
funtionality in parent class is over shadowed by the
funtionality in subclass.

Is This Answer Correct ?    72 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of 'super' keyword inside a constructor?

562


Can each java object keep track of all the threads that want to exclusively access it?

539


What is stack explain?

502


What is finally block?

566


What is string value?

638






What does math floor () do?

555


Explain inner classes ?

655


What is the generic function?

528


What is meant by data hiding/encapsulation?

574


Is main a function?

516


What do you mean by composition in java?

572


When will we prefer to use set and list in java and why?

550


Why charat is used in java?

545


What is the default value of byte datatype in java?

487


What is the difference between an argument and a parameter?

539