英文:
Is list different implementation a polymorphism?
问题
List
List
这两个对象都是List,但实现方式不同。
这算是在调用多态吗?
英文:
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?
答案1
得分: 2
是的,这被称为子类型多态性。
它是“多态性”这一总体概念的几种类型之一。
英文:
Yes, this is called subtype polymorphism.
It is one of the several types of the general concept of "polymorphism."
专注分享java语言的经验与见解,让所有开发者获益!
评论