英文:
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."
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论