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[]) {

        // create an array of strings
        String a[] = new String[] { "CSS", "HTML", "Python", "tutorial from java2s.com" };

        List<String> list1 = Arrays.asList(a);

        // printing the list
        System.out.println("The list is:" + list1);
    }
}