Java tutorial
//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)); } }