title: Incompatible types: int cannot be converted to integer
body: <p>The int should autobox but I do not know why it is not. When i try to compile, it gives me an incompatible types error. Is there something wrong with my code? </p>
  
  <pre><code>Scanner console = new Scanner(System.in);
      ArrayList&lt;Integer&gt; list = new ArrayList&lt;&gt;();
      int first = console.nextInt();
      while (first!=0) {
          first=console.nextInt();
          list.add(first);
      }
      System.out.println("Your first list: " + list);
  }
  </code></pre>