Some ways to iterate through the characters of a string in Java are:
- Using
StringTokenizer
? - Converting the
String
to achar[]
and iterating over that.
What is the easiest/best/most correct way to iterate?
Some ways to iterate through the characters of a string in Java are:
StringTokenizer
?String
to a char[]
and iterating over that.What is the easiest/best/most correct way to iterate?