Answers for "how to remove an space from an array java"

0

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();
}
Posted by: Guest on June-02-2020
0

java array remove space

String str = "Programming is easy to learn";
String result = str.replaceAll("\\s+","");
Posted by: Guest on March-14-2021

Code answers related to "how to remove an space from an array java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language