Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.util.*;

public class Main {
    private static final String defaultDelimiter = ",";

    public static List<String> split(String input) {
        return split(input, defaultDelimiter);
    }

    private static List<String> split(String input, String delimiter) {
        if (input == null || input.isEmpty()) {
            return Collections.emptyList();
        }
        return new ArrayList<String>(Arrays.asList(input.split(delimiter)));
    }
}