Below is the 2 line code for replacing “\n” from any string in JAVA.
st = "username\n\n\n"
st=st.trim();
st=st.replace("\n", "");
System.out.println(st);
Output
username
Below is the 2 line code for replacing “\n” from any string in JAVA.
st = "username\n\n\n"
st=st.trim();
st=st.replace("\n", "");
System.out.println(st);
Output
username
I know this site offers quality depending articles and additional information,
is there any other web site which gives these information in quality?
Hello to every single one, it’s truly a good for me to pay a
quick visit this web page, it contains valuable Information.
Appreciate the recommendation. Will try it
out.
A person necessarily help to make significantly posts I would state.
That is the very first time I frequented your web page and thus
far? I surprised with the research you made to make this particular
put up amazing. Magnificent job!