I have a string like this:
mysz = \"name=john age=13 year=2001\";
I want to remove the whitespaces in the string. I tried trim()
trim()
White space can remove using isWhitespace function from Character Class.
public static void main(String[] args) { String withSpace = "Remove white space from line"; StringBuilder removeSpace = new StringBuilder(); for (int i = 0; i