Here you can find the source of prepend(String first, List
public static List<String> prepend(String first, List<String> list)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static List<String> prepend(String first, List<String> list) { return merge(Arrays.asList(first), list); }/*from www .ja v a 2 s . co m*/ public static List<String> merge(List<String> first, List<String> second) { ArrayList<String> result = new ArrayList<String>(first); result.addAll(second); return result; } }