code: private static List<String> parseList(String input, String delim) {
          List<String> result = new ArrayList<>();
  
          StringTokenizer st = new StringTokenizer(input, delim);
          while (st.hasMoreTokens()) {
              String token = st.nextToken().trim();
              if (token.length() > 0) {
                  result.add(token);
              }
          }
  
          return result;
      }
docs: Create a List from a delimited string
  
  @param input
  @param delim