title: How does using add() to one ArrayList interfere the size of the other one?
body: <p>I created two ArrayList and I want to add some Integers to ArrayList a.
  In Java code I did this:</p>
  
  <pre><code>ArrayList &lt; Integer &gt; a = new ArrayList &lt; Integer &gt;();
  ArrayList b = a;
  a.add(new Integer(4));
  b.add(new Integer(5));
  a.add(new Integer(6));
  a.add(new Integer(7));
  System.out.println(a.size());
  </code></pre>
  
  <p>My quesiton is why does <code>b.add(new Integer(5));</code>also add one object to ArrayList a?</p>