1. 程式人生 > >list.indexOf(Object O)和list.lastIndexOf(Object O)的用法

list.indexOf(Object O)和list.lastIndexOf(Object O)的用法

https://blog.csdn.net/qq_38973841/article/details/83753639

 

一、list.indexOf(Object O) 是 返回物件O在List集合中出現的索引位置


二、list.lastIndexOf(Object O) 是 返回物件O在List集合中最後一次出現的位置索引


三、list.subList(int formIndex, int toIndex) 是返回從索引 formIndex(包括)到 toIndex(不包括)處所有的元素


 

 

 

 
--------------------- 
作者:後視鏡的世界 
來源:CSDN 
原文:https://blog.csdn.net/qq_38973841/article/details/83753639 
版權宣告:本文為博主原創文章,轉載請附上博文連結!