title: ArrayList <Integer> with the get/remove method
body: <p>when I use ArrayList in Java, there are some things that I do not understand. Here is my initialization code:</p>
  
  <pre><code> ArrayList&lt;Integer&gt; list = new ArrayList &lt;Integer&gt; ();
  list.add (0);
  list.add (1);
  </code></pre>
  
  <p>sometimes I need to delete an object by its index:</p>
  
  <pre><code>list.remove (0) // delete the object in the first box
  </code></pre>
  
  <p>but sometimes I want to delete an object by its contents:</p>
  
  <pre><code>list.remove (0) // delete the object HAS Which value of 0
  </code></pre>
  
  <p>this code is very ambiguous. To clarify what I want to do it in code, I specify the type like this:</p>
  
  <pre><code>list.remove ((Object) 0) // delete the object which has a value of 0
  </code></pre>
  
  <p>If I do not AC, the only way to know which methods are called is to put the mouse pointer on the method to see:
  java.util.ArrayList.remove boolean (Object object)</p>
  
  <p>Java But how does it make difference? 
  is there a method pointer? 
  Is there a less ambiguous way to do this?</p>
  
  <p>thank you very much, sorry for my English.</p>
  
  <p>PS: I should say that I finally used SparseIntArray but I am curiously</p>