java面試題收集(07)

1、Iterator怎麼使用?有什麼特點? (1)Iterator在遍歷元素過程中,有線程修改集合元素會有ConcurrentModificationEception異常。 (2)Iterator本身不具有裝載數據功能,需依附Collection對象使用。 (3)next()是用遊標指向的方式返回下一個元素的。 2、Iterator和Listlterator有什麼區別? (1)所屬關係,ListI
相關文章
相關標籤/搜索