Here you can find the source of prependInList(T el, T[] array)
public static <T> List<T> prependInList(T el, T[] array)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static <T> List<T> prependInList(T el, T[] array) { List<T> result = new ArrayList<>(array.length + 1); result.add(el);/*from w w w . j a v a 2s . c o m*/ Collections.addAll(result, array); return result; } }