employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Engaged employer

Tata Consultancy Services interview question

What's polymorphism?

Interview Answer

Anonymous

13 Jun 2018

Ability of an object to take on many forms. Any java object that can pass more than one IS-A relationship is considered to be ploymorphic. EXAMPLE: public interface Vegetarian{} public class Animal{} public class Deer extends Animal implements Vegetarian{} A Deer IS-A Animal A Deer IS-A Vegeterian A Deer IS-A Deer A Deer IS-A Object