Some ways to iterate through the characters of a string in Java are:

  1. Using StringTokenizer?
  2. Converting the String to a char[] and iterating over that.

What is the easiest/best/most correct way to iterate?

16 Answers
16

Leave a Reply

Your email address will not be published. Required fields are marked *