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 {
    public static ArrayList<Long> getArrayListOfLongFromString(String src, String separator) {
        ArrayList<Long> result = new ArrayList<Long>();

        String[] strNumbers = src.split(separator);

        for (String str : strNumbers) {
            result.add(new Long(str));
        }

        return result;
    }
}