are you sure.....because in one job aptitude test they asked this question ,which is the form of polymorphism and the options where 1.overriding 2.overloading 3.inheritance .......that's why i am trying to confirm
Actually- overriding comes only when Inheritance is there- So I see the options are itself not correct. You combine overriding and inheritance for Runtime polymorphism. So I would say- both overloading and overriding can be used for polymorphic code.
There have been lot of discussions about Runtime Polymorphism either in this forum or in Beginners Java forum.