code: public static String[] trimArray(String[] strings) {
          for (int i = 0; i < strings.length; i++) {
              strings[i] = strings[i].trim();
          }
          return strings;
      }
docs: Trims all elements inside the array, modifying the original array.
  
  @param strings The string array
  @return The passed string array, trimmed