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
Why is serialization required?
How do you take thread dump in java?
Explain aggregation in java?
What is break and continue statement?
Why destructor is not used in java?
Explain the access modifiers for a class, method and variables?
Is it possible for yielded thread to get chance for its execution again ?
What is a singleton class? Give a practical example of its usage.
What is an error in java?
What is hashmap in java?
What is hashmap and map?
Can a constructor be protected?
What is static variable with example?
How many types of exception can occur in a java program?
What is difference between final and immutable?