Here you can find the source of toStringList(List list)
public static List<String> toStringList(List list)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static List<String> toStringList(List list) { List<String> stringList = new ArrayList<>(); if (list != null) { for (Object object : list) stringList.add(object != null ? object.toString() : null); }/*w ww. j a v a2 s . c o m*/ return stringList; } }