Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static void main(String[] args) throws Exception {
        Iterator it = Arrays.asList("a", "b", "java2s.com").iterator();
        while (it.hasNext()) {
            String key = it.next().toString();
            System.out.println(key);
        }
    }
}