Skip to content

Why iteration is an interface

A method takes an Iterable<String> rather than an ArrayList<String>.

What does this gain?