can for of loop be used to iterate over a string in java code example
Example: iterate over string java
String str = "hello";
for (char c : str.toCharArray())
//process c
String str = "hello";
for (char c : str.toCharArray())
//process c