Following code sample shows how we can use StringCharacterIterator to Iterate over the characters in the forward direction.

Java Code:
CharacterIterator it = new StringCharacterIterator("Java Forums");
for (char ch=it.first(); ch != CharacterIterator.DONE; ch=it.next()) {
	    	        System.out.println(ch);
}
Output:
Java Code:
J
a
v
a
 
F
o
r
u
m
s