MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

public class MainClass {
    public static void main(String[] a) {

        List list = Arrays.asList(new String[] { "A", "B", "C", "D" });
        Iterator iter = list.iterator();

        while (iter.hasNext()) {
            System.out.println(iter.next());
        }

    }
}