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
Is age discrete or continuous?
What are void pointers?
What is set in java?
Why java is object oriented?
How to sort array of 0 and 1 in java?
Which of the classes will have more memory allocated?
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
What is static keyword?
What are the different conditional statements?
Why synchronization is important in java?
Why singleton pattern is better than creating singleton class with static instance?
When the constructor of a class is invoked?
When should a function throw an exception?
What is the generic class?
Differentiate between class and structure.