List<String> stringToList(String names) { // return split names by space List<String> nameList = names.split(" "); return nameList; }