java.util.List

      Everyone on earth knows that java.util.List (hereinafter referred to as List) is a part of the java collection (commonly known as Collection), an interface that inherits the Collection interface. It has many features, so there are many scenarios used. Let us first briefly understand what features it has.

  • elements are ordered;
  • elements can be repeated;
  • Each element has its own sequential index.

      List mainly contains three subclasses, ArrayList, Vector, LinkedList. Next, we use a picture to illustrate the structure of List. 

Structure diagram

       From the above figure, I can see the structure of the complete List, and the subclasses in the List have their own characteristics and different usage scenarios

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326212205&siteId=291194637