devxlogo

October 15, 2019

Loop the Characters of a String

Looping the characters of a string can be done via charAt() or toCharArray() as follows: String str = “hello world”;for (int i = 0; i