title: Using Arrays.asList with int array
body: <p>Using <code>java.util.Arrays.asList</code>, why its shows different list size  for <code>int</code> (Primitive type) and <code>String</code> array?</p>
  
  <p>a) With <code>int</code> array, whenever I execute following program the List size = 1</p>
  
  <pre><code>public static void main(String[] args) {
          int ar[]=new int[]{1,2,3,4,5};
          List list=Arrays.asList(ar);
          System.out.println(list.size());
  
      }
  </code></pre>
  
  <p>b) But if i change from <code>int</code> array type to <code>String</code> array(like <code>String ar[] = new String[]{"abc","klm","xyz","pqr"};</code>) , then I am getting the list size as 4 which i think is correct.</p>
  
  <p><strong>PS</strong> : With <code>Integer</code> (Wrapper Class) array, then result is Fine, but i am not sure why in primitive <code>int</code> array, the list size is 1. Please explain.</p>