@@ -0,0 +1,918 @@
+package curiously_recurring.wildcards;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Apublic class UnmodifiableList%0A%7B%0A%0A    public static void main(String%5B%5D args)%0A    %7B%0A        List%3CFruit%3E fruits = new ArrayList%3C%3E();%0A        fruits.add(new Apple());%0A%0A        List%3CFruit%3E unmodifiableFruits = Collections.unmodifiableList(fruits);%0A        unmodifiableFruits.add(new Apple());%0A%0A        List%3C? extends Fruit%3E reallyUnmodifiableList = unmodifiableList(fruits);%0A%0A        //reallyUnmodifiableList.add(new Apple());%0A        final Fruit fruit = reallyUnmodifiableList.get(0);%0A%0A        // Still not typesafe%0A        reallyUnmodifiableList.remove(%22%22);%0A    %7D%0A%0A    public static %3CT%3E List%3C? extends T%3E unmodifiableList(List%3C? extends T%3E list)%0A    %7B%0A        return Collections.unmodifiableList(list);%0A    %7D%0A%0A    static class Fruit%0A    %7B%0A%0A    %7D%0A%0A    static class Apple extends Fruit%0A    %7B%0A%0A    %7D%0A%7D%0A

add unmodifiable list example