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 / rakesh

Overloading class has different returntype.
overloading comes with in class but overriding comes in two
classes.
Overloading is resolved at compiletime
Overriding is resolved at runtime.

Is This Answer Correct ?    39 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which programming language is most secure?

525


What are the drawbacks for singleton class?

514


What happens if we don’t define serial version uid?

566


What is covariant return type?

639


What is the ==?

461






What is memory leak and how does java handle it?

517


What are java annotations?

643


Explain the private field modifier?

608


What does the exclamation mark mean in java?

588


How do constructors use this() and super()?

542


What are the types of methodology?

508


Is alive and join method in java?

536


Is there any case when finally will not be executed?

521


What is nested loop? What is dangling else condition in it?

572


Define how does a try statement determine which catch clause should be used to handle an exception?

580