Hugoniasty
Hugoniasty

Reputation: 13

Is list different implementation a polymorphism?

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

Answers (1)

Joni
Joni

Reputation: 111259

Yes, this is called subtype polymorphism.

It is one of the several types of the general concept of "polymorphism."

Upvotes: 2

Related Questions