Java Substitua o espaço em branco
st = st.replaceAll("\\s+","")
Obedient Octopus
st = st.replaceAll("\\s+","")
st = st.replaceAll("\\s+","")
`\\s` # Matches whitespace characters.
+ # One or more