const iterable = 'boo';
for (const value of iterable) {
console.log(value);
}
// "b"
// "o"
// "o"
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
class Main
{
// Iterate over the characters of a string
public static void main(String[] args)
{
String s = "Techie Delight";
CharacterIterator it = new StringCharacterIterator(s);
while (it.current() != CharacterIterator.DONE)
{
System.out.print(it.current());
it.next();
}
}
}