how to remove all line breaks in string java code example
Example 1: how to remove all whitespace from string java
st = st.replaceAll("\\s+","")
Example 2: java remove character from string after
String result = input.split("-")[0];
st = st.replaceAll("\\s+","")
String result = input.split("-")[0];