Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List stringsToList(String as[]) {
        Object obj;
        if (as == null || as.length == 0) {
            obj = null;
        } else {
            ArrayList arraylist = new ArrayList();
            for (int i = 0; i < as.length; i++)
                arraylist.add(as[i]);

            obj = arraylist;
        }
        return ((List) (obj));
    }
}