title: Regarding unmodifiable collection
body: <p>Consider the following code below</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.Collections;
  import java.util.List;
  
  public class Test {
  
      public static void main(String[] args) {
          List&lt;Integer&gt; intList1=new ArrayList&lt;Integer&gt;();
          List&lt;Integer&gt; intList2;
          intList1.add(1);
          intList1.add(2);
          intList1.add(3);
          intList2=Collections.unmodifiableList(intList1);
          intList1.add(4);
  
          for(int i=0;i&lt;4;i++)
          {
              System.out.println(intList2.get(i));
          }
      }
  
  }
  </code></pre>
  
  <p>The result of the above code is </p>
  
  <pre><code>1
  2
  3
  4
  </code></pre>
  
  <p>In the above code we create an <i>unmodifiable</i> <code>List intList2</code> from the contents of the <code>List intList</code>1. But after the <code>Collections.unmodifiable</code> statement when I make a change to <code>intList1</code> that change reflects to <code>intList2</code>. How is this possible ?</p>