For example, I have a class that says
public class KeyList extends Vector<Object> { }
but it never specifically creates a new Vector of any kind. This is part of an imple_Stack Overflow中文网
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
but it never specifically creates a new Vector of any kind. This is part of an imple
but it never specifically creates a new Vector of any kind. This is part of an implementation of Eliza that I found online
extends means that KeyList is-a Vector. It does not (necessarily) mean that KeyList has-a Vector.
extends
KeyList
Vector
See The Java Tutorial for more, specifically What Is Inheritance? and the Inheritance section.
extends表示KeyList is-a Vector。它并不(必然)意味着KeyList has-a Vector。
有关更多信息,请参阅 Java 教程,特别是什么是继承?和继承部分。
It is about inheritance: meaning that KeyList is a subclass of Vector<Object>. Essentially it means that KeyList is a modified Vector<Object> in itself. For more information, you should read Oracle's docs on inheritance.
Vector<Object>