Here you can find the source of toList(String transaction)
static List<String> toList(String transaction)
//package com.java2s; //License from project: Apache License import java.util.List; import java.util.ArrayList; public class Main { static List<String> toList(String transaction) { String[] items = transaction.trim().split(","); List<String> list = new ArrayList<String>(); for (String item : items) { list.add(item);/*from w w w.j a v a 2s . co m*/ } return list; } }