title: Cannot add an integer to <Long> ArrayList
body: <p>I have created an ArrayList:  </p>
  
  <pre><code>import java.util.Scanner;
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.Arrays;
  class Main{
      static ArrayList&lt;Long&gt; fibo_list=new ArrayList&lt;Long&gt;();
      static int current_index;
      public static void main(String args[]){
          fibo_list.add(0);
          fibo_list.add(1);
          fibo_list.add(1);
  </code></pre>
  
  <p>The three fibo_list.add() throws the same type of error. Here's the first one:</p>
  
  <pre><code>error: no suitable method found for add(int)
      fibo_list.add(0);
               ^
  method ArrayList.add(int,Long) is not applicable
    (actual and formal argument lists differ in length)
  method ArrayList.add(Long) is not applicable
    (actual argument int cannot be converted to Long by method invocation conversion)
  method AbstractList.add(int,Long) is not applicable
    (actual and formal argument lists differ in length)
  method AbstractList.add(Long) is not applicable
    (actual argument int cannot be converted to Long by method invocation conversion)
  method AbstractCollection.add(Long) is not applicable
    (actual argument int cannot be converted to Long by method invocation conversion)
  </code></pre>
  
  <p>Now it worked putting it like this :</p>
  
  <pre><code>fibo_list.add((long)0);
  fibo_list.add((long)1);
  fibo_list.add((long)1);
  </code></pre>
  
  <p>But why didn't it implicitly cast itself ?</p>