October 2018
Intermediate to advanced
370 pages
9h 15m
English
This MutableIterable interface inherits the Iterable interface and contains its own mutable iterator. The mutable iterator provides a remove function, which removes the underlying element in the list. Take a look at the following diagram of the MutableIterable interface, which inherits the Iterable interface:

Create a mutable list and expose it with the mutableIterable interface. Get mutableIterator from the list and use the remove function to remove the underlying element of the list:
fun iterableIterface(){ val mutableList : MutableIterable<Int> = mutableListOf(1,2,3,4,5,6,7,8,9) val mutableIter : MutableIterator ...Read now
Unlock full access