title: How to compare two Integers in java
body: <p>I want to compare elements in two list using &lt; > ==</p>
  
  <p>Is it the right way  to use intValue()?</p>
  
  <pre><code>List&lt;Integer&gt; a = new ArrayList&lt;Integer&gt;();
  a.add(129);
  
  List&lt;Integer&gt; b = new ArrayList&lt;Integer&gt;();
  b.add(128);
  
  if(a.get(0).intValue() &gt; b.get(o).intValue()) {
     // something
  }
  </code></pre>