Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {

    public static void main(String[] args) {
        String[] cars = { "A", "B", "C", "D" };
        List<String> carList = Arrays.asList(cars);

        for (String car : carList) {
            System.out.println(car);
        }
    }
}