Here you can find the source of prepend(String prefix, List
public static List<String> prepend(String prefix, List<String> strings)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> prepend(String prefix, List<String> strings) { List<String> result = new ArrayList<String>(); for (String string : strings) { result.add(prefix + string); }//w w w . ja va2 s . c o m return result; } }