Java String to List toList(String transaction)

Here you can find the source of toList(String transaction)

Description

to List

License

Apache License

Declaration

static List<String> toList(String transaction) 

Method Source Code


//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;
    }
}

Related

  1. toList(String s, String delimiter)
  2. toList(String str)
  3. toList(String str)
  4. toList(String string)
  5. toList(String text)
  6. toList(String val)
  7. toList(String val, String separator)