Passing Integer to int and vice versa
<p>Just wondered why is it possible to pass Integer as argument where method parameter is of int type and vice versa?</p>

<pre><code>public class Salmon {

 public static Integer foo(Integer a, int b){
  return a - b;
 }
 public static void main(String[] args) {
  Integer a = 10;
  int b = 1;
  foo(b, a);
 }
}
</code></pre>
