單項選擇題

Iterator和ListIterator的區(qū)別正確的是()

A.ListIterator和Iterator都沒有hasNext()和next()方法
B.ListIterator有add()方法,可以向List中添加對象,而Iterator不能
C.兩者沒有區(qū)別
D.ListIterator和Iterator都沒有刪除的方法

微信掃碼免費搜題