This code is supposed to check through an array of strings and see if there is a space between a word. Here is an example: {“every”, “near ing”, “ checking”, “food “, “stand”, “
maby this wil work
public static String[] removeSpace(String[] ans) { for(String s:ans){ while(s.contains(" ")){ s = s.split(" ")[0] + s.split(" ")[1]; } } return ans; }
You can try something like this:
for(int i = 0; i<arr.length; i++) { arr[i] = arr[i].replace(" ", ""); }