public static <T> List<T> randomSelect(List<T> list, int n) {
        return new Random().ints(n, 0, list.size()).mapToObj(list::get).collect(Collectors.toList());
    }
(**) Extract a given number of randomly selected elements from a list
java8/src/main/java/com/shekhargulati/ninetynine_problems/_01_lists/P23.java