Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.ArrayList;
import java.util.Collection;

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

        arrlist.add(1);
        arrlist.add(2);
        arrlist.add(3);
        arrlist.add(4);
        arrlist.add(5);

        ArrayList<Integer> anotherList = new ArrayList<Integer>(arrlist);
        System.out.println(anotherList);

    }
}