Java tutorial
import java.util.Collections; import java.util.LinkedList; import java.util.List; public class Main { public static void main(String[] args) { List<Integer> list = new LinkedList<Integer>(); list.add(1); List<Integer> unmodifiableList = Collections.unmodifiableList(list); System.out.println(unmodifiableList.getClass()); if (unmodifiableList.getClass().getName().contains("UnmodifiableList")) System.out.println(true); } }