Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.LinkedList;
import java.util.List;

public class Main {

    public static void main(String[] args) {

        LinkedList<String> theList = new LinkedList<String>();
        theList.add("A");
        theList.add("B");
        theList.add("C");
        theList.add("D");

        String[] my = theList.toArray(new String[0]);

        for (int i = 0; i < my.length; i++) {
            System.out.println(my[i]);
        }
    }
}