title: Java 8 predicate generic function is not accepting List of Integers
body: <p>I have one filter Method using Predicate Interface to filter List on some conditions.</p>
  
  <pre><code>public static &lt;T&gt; List&lt;T&gt; filter(List&lt;T&gt; list,Predicate&lt;T&gt; predicate){
      List&lt;T&gt; result=new ArrayList&lt;T&gt;();
      for(T t:list){
          if(predicate.test(t)){
              result.add(t);
          }
      }
      return result;
  }
  </code></pre>
  
  <p>I have one Integer array List as List arraIntegerList=Arrays.asList(1,2,3,3,4);</p>
  
  <p>While calling above method it is giving compilation error.</p>
  
  <pre><code>System.out.println(filter(arraIntegerList,(int i)-&gt;(i&gt;2)));
  </code></pre>
  
  <p>Why It is giving compilation error while same list with String is working fine.</p>