Fast Enterprises interview question

What is Polymorphism

Interview Answers

Anonymous

14 Aug 2015

Polymorphism is perhaps most commonly referred to functions/methods that are overloaded based on the parameters being passed in, for example add(int x, int y) vs. add(string a, string b). In object oriented, this also refers to subtyping. Consider a Vehicle super class and a Bus and Airplane class that inherit from Vehicle. Now a method of a Vehicle object can behave differently depending on whether the vehicle is also a Bus or Airplane. Also a Bus object is now both a Bus and a Vehicle.

2

Anonymous

9 May 2015

Pass by reference vs. pass by value