Why doesn't the String class in Java implement Iterable?
- by xyzzyz
Many Java framework classes implement Iterable, however String does not. It makes sense to iterate over characters in a String, just as one can iterate over items in a regular array.
Is there a reason why String does not implement Iterable?