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

I don’t want my class to be inherited by any other class. What should I do?

573


What do you mean by thread safe?

537


What is the difference between an object-oriented programming language and object-based programming language?

563


What is the base class in java from which all classes are derived?

515


What is integer parseint?

544






Can bool be null?

518


Why do we need autoboxing in java?

514


How do you use compareto?

547


Which container method is used to cause a container to be laid out and redisplayed in java programming?

596


What is singleton math?

571


Can we catch more than one exception in a single catch block?

624


Define jit compiler?

655


Which sorting algorithm is in place?

535


What are the features in java?

574


Is arraylist ordered?

563