当前位置:网站首页>Common method signatures and meanings of Iterable, collection and list

Common method signatures and meanings of Iterable, collection and list

2022-07-07 07:43:00 The mountain stream is clear and misty

One 、Iterable

Iterbale Is an iterative function Generic Interface , Can pass for-each loop , from Iterable obtain Iterator Or by Iterable Of for each() Method

Two 、Collection

1.Collection Inherited from Iterable The generic interface of , The interface used to implement the collection .

2.Collection It does not necessarily have the characteristics of linear structure . Linear table is a kind of Collection, Nonlinear table is also a kind of Collection.

Collection Method signature :

  3、 ... and 、List

1.List It's an interface , Interface cannot be instantiated , You can only refer to specific classes that implement their interfaces

2.List It's a linear table , namely n A finite sequence of elements of the same type , In this sequence, you can add, delete, check and modify variables , The elements have order ,List Have the ability to iterate , Have the ability to pack elements

List Method signature :

 

 

原网站

版权声明
本文为[The mountain stream is clear and misty]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070412291132.html