Sometimes people use the phrase "Polymorphic method/function".
Does it mean:
- A method that takes a Polymorphic type as a parameter, and performs some operation on it. By "Polymorphic type" I mean a super-type with multiple sub-types.
- An abstract or virtual method in a super-type, with multiple sub-types that implement/override the method differently.
add
on a list will append an object to the list. The type parameter of the list (List<String>
,List<Customer>
) ensures that an object of the correct class is appended.