I have the following for loop which iterates through a list of strings and stores the first character of each word in a StringBuilder. I would like to know how can
StringBuilder
Tons of ways to do this - the most simple option: stick to adding to a StringBuilder and do this:
StringBuilder chars = new StringBuilder(); list.forEach(l -> chars.append(l.charAt(0)));