As best practice you might want to consider using aStringCharacterIterator object to loop over the string and aStringBuffer instead of +=