Why doesn't the String class in Java implement Iterable?
Posted
by xyzzyz
on Stack Overflow
See other posts from Stack Overflow
or by xyzzyz
Published on 2010-05-05T10:57:08Z
Indexed on
2010/05/05
11:48 UTC
Read the original article
Hit count: 178
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?
© Stack Overflow or respective owner