Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {
    public static void main(String args[]) {
        List<String> arrlist = new ArrayList<String>();

        arrlist.add("A");
        arrlist.add("B");
        arrlist.add("C");
        arrlist.add("from java2s.com");

        System.out.println(arrlist);

        // add values to this collection
        boolean b = Collections.addAll(arrlist, "1", "2", "3");

        System.out.println(arrlist);
    }
}