code: public static <T> List<T> subList(List<T> list, int... indices) {
  
      Assert.notNull(list, "List is required");
      Assert.notNull(indices, "Indices is required");
  
      List<T> subList = new ArrayList<>(indices.length);
  
      for (int index : indices) {
        subList.add(list.get(index));
      }
  
      return subList;
    }
docs: Creates a sub-list from the given {@link List} with values at the specified indices.
  
  @param <T> Class type of the elements in the {@link List}.
  @param list {@link List} of elements from which to create the sub-list.
  @param indices array of indices referring to values in the {@link List} to include in the sub-list.
  @return a sub-list containing values at the given indices in the {@link List}.
  @throws IllegalArgumentException if either the {@link List} or array of indices are null.
  @throws IndexOutOfBoundsException if the indices are not valid indexes in the {@link List}.
  @see java.util.List