how to remove white spaces in an array in java code example
Example 1: how to remove spaces from an array in java
for (int i = 0; i < temp.length; i++){
temp[i] = if(!temp[i].trim().equals("") || temp[i]!=null)temp[i].trim();
}
Example 2: how to remove white space between numbers in a string in java
"Hello 111 222 333 World!"