title: Collections.unmodifiableList and defensive copy
body: <p>If I write</p>
  
  <pre><code>List&lt;Integer&gt; a1 = Arrays.asList(1, 2, 3);
  List&lt;Integer&gt; a2 = Collections.unmodifiableList(a1);
  </code></pre>
  
  <p><code>a2</code> is read-only but if I write</p>
  
  <pre><code>a1.set(0,10);
  </code></pre>
  
  <p>then <code>a2</code> is also modified.</p>
  
  <p>If in the API is said:</p>
  
  <blockquote>
    <p>Returns an unmodifiable view of the specified collection. This method
    allows modules to provide users with "read-only" access to internal
    collections.</p>
  </blockquote>
  
  <p>then, why if I modify the original collection also the target-copied collection is modified?</p>
  
  <p>Maybe did I misunderstand the meaning and if so what's the way to
  write a defensive copy of that collection?</p>