Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. String withSpaces = "a b c d";
  2. System.out.println(withSpaces.replaceAll("\s+", " "));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement