Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.*;

public class Main {
    /**
     * Array to unmodifiable list.
     * @param values an array.
     * @param <T> type of array element.
     * @return unmodifiable list.
     */
    public static <T> List<T> unmodifiableList(T[] values) {
        return Collections.unmodifiableList(Arrays.asList(values));
    }
}