SyntaxFix
Write A Post
Hire A Developer
Questions
I'm pretty sure he doesn't want the spaces to be output though.
for (char c: s.toCharArray()) { if (isAlpha(c)) { System.out.println(c); } }