Reputation: 13
List <String> arrayList = new ArrayList<>();
List <String> linkedList = new LinkedList<>();
Two these objects gives List, but the implementation is different. Is it calling a polymorphism?
Upvotes: 1
Views: 30
Reputation: 111259
Yes, this is called subtype polymorphism.
It is one of the several types of the general concept of "polymorphism."
Upvotes: 2