October 2018
Intermediate to advanced
370 pages
9h 15m
English
This is the parent or base interface in the iterator hierarchy. This iterator can be accessed by any list using list.iterator(). This is why iterators can work with lists, collections, and mutable lists:

The iterator contains two functions that help to access elements:
fun iteratorFunction() { val list = listOf(1,2,3,4,5) var listIterator = list.iterator() while (listIterator.hasNext()) { println(listIterator.next()) }}
Use the hasNext function to verify ...
Read now
Unlock full access