title: Query on Collections.unmodifiableList() behaviour
body: <p>I have a query regarding <code>unmodifiableList</code> API of <code>Collections</code>.</p>
  
  <p>Code snippet:</p>
  
  <pre><code>import java.util.*;
  
  public class ReadOnlyList{
      public static void main(String args[]){
          List&lt;String&gt; list = new ArrayList&lt;String&gt;();
          list.add("Stack");
          list.add("Over");
          List list1 = Collections.unmodifiableList(list);
          //list1.add("Flow");
          list.add("Flow");
          System.out.println("sizes:1:2:"+list.size()+":"+list1.size());
          for (Iterator it = list1.iterator();it.hasNext();){
              System.out.println("elements:"+it.next());
          }
          System.out.println("__________");
          list.remove("Flow");
          for (Iterator it = list1.iterator();it.hasNext();){
              System.out.println("elements:"+it.next());
          }       
      }
  }
  </code></pre>
  
  <p>I know that I can't modify the unmodifible collection and hence I will get error for</p>
  
  <pre><code>//list1.add("Flow");
  </code></pre>
  
  <p>I expected that I will get read-only list of <code>list</code> varaible until the point I create <code>unmodifiableList</code>. But even after this <code>list1</code> creation, the changes in parent list are reflected in child <code>list1</code></p>
  
  <p>I can't modify child unmodifible list but still I receive modifications of parent list. It's a surprise for me.</p>
  
  <p>I know that fix is creating new Collection from parent but stil did not understand above behaviour. </p>