Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String withSpaces = "a b c d";
- System.out.println(withSpaces.replaceAll("\s+", " "));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement