java - Why does ListIterator provide an index for elements in a LinkedList? -


unlike arraylist, linkedlist can not access element @ particular point using index.

if case, point of listiterator providing functionality returns index of particular point in linkedlist?

why ever need know index of linkedlist, if can't ever use access element. missing here?

you can use get() linkedlist, has o(n) time complexity can inefficient in situations. can use element index estimate order of elements in list or else depending of needs.


Comments