title: Comparing two Integer list using java8 filter
body: <p>I have a problem as follows. There are two Integer list a and b with equal size. Now I want to compare both list value at same index. My function returns list with 2 values. First value is count of value greater in list a. Second value is count of value greater in list b. If both has same value than no increment in count.</p>
  
  <p>can I get some idea how it can be  achieved in java8 using stream/filter/predicates</p>
  
  <p>I had retrun the method in older java version.</p>
  
  <pre><code>    static List&lt;Integer&gt; compareTriplets(List&lt;Integer&gt; a, List&lt;Integer&gt; b) {
          List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();
          int asize = 0;
          int bsize = 0;
          for (int i = 0; i &lt;b.size();i++) {
              if(a.get(i) &gt; b.get(i)) {
                  asize++;
              }else if(a.get(i) &lt; b.get(i)) {
                  bsize++;
              }
          }
          list.add(asize);
          list.add(bsize);
          return list;
      }
  </code></pre>
  
  <p>e.g.1.  Input: a =5 6 7
  b = 3 6 10
  Output:
  1 1
  e.g 2. Input: a = 17 28 30
  b = 99 16 8
  Output:
  2 1</p>