If I write
List a1 = Arrays.asList(1, 2, 3); List a2 = Collections.unmodifiableList(a1);
a2 is r
a2
If you were looking to keep a1 mutable and make an immutable copy of it without Guava, this is one way you could do it.
a1
List a1 = Arrays.asList(1, 2, 3); List a2 = Collections.unmodifiableList(new ArrayList<>(a1));