--

The JDK collections like ArrayList already implement Iterable. Likewise in Scala, it’s already taken care of, probably the same in Kotlin. It’s a matter of concern only when you want to create your own data structures.

So you can almost take Iterable for granted. I think that the Comparable and Comparator interfaces are of more frequent concern.

--

--

Alonso Del Arte
Alonso Del Arte

Written by Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified

No responses yet