iterable is a class interface
And iterator is a method in iterable that returns an iterable object
The Collection interface inherits the iterable interface, so all collection classes that implement the Collection interface have an iterator method
iterable is a class interface
And iterator is a method in iterable that returns an iterable object
The Collection interface inherits the iterable interface, so all collection classes that implement the Collection interface have an iterator method