Answers for "how to call foreach on string in java"

0

for each loop string java

String s = "xyz"
for (char ch: s.toCharArray()) {
  System.out.println(ch);
}
Posted by: Guest on April-14-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language