Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;

public class Main {
    /**
     * Splits the string using a comma, creates and returns an array list of strings.
     * @param item
     * @return
     */
    public static ArrayList<String> split(String item) {
        ArrayList<String> list = new ArrayList<String>();

        for (String i : item.split(","))
            list.add(i);

        return list;
    }
}