title: remove() method of arraylist is leading to shrinking size of arraylist
body: <p>I have read that when we remove an <code>Object</code> from <code>ArrayList</code>, its size doesn't decrease.</p>
  
  <p>I tried the below code to test this, but found that size is decreased. Could anyone correct or explain this to me?</p>
  
  <pre><code>package collections;
  
  import java.util.ArrayList;
  import java.util.List;
  
  public class ArrayListExample {  
  public static void main(String[] args) {  
      //Creating list of Books  
      List&lt;Book&gt; list=new ArrayList&lt;Book&gt;();  
      //Creating Books  
      Book b1=new Book(101,"Let us C","Yashwant Kanetkar","BPB",8);  
      Book b2=new Book(102,"Data Communications &amp; Networking","Forouzan","Mc Graw Hill",4);  
      Book b3=new Book(103,"Operating System","Galvin","Wiley",6);  
      //Adding Books to list  
      list.clear();
      list.add(b1);  
      list.add(b2);  
      list.add(b3); 
      list.contains(b3);
      int size= list.size();
      System.out.println(size);
      list.remove(b3);
      int size1= list.size();
      System.out.println(size1);      
  }  
  }  
  </code></pre>