title: why in Kotlin, Stack<Int> can push(null) but ArrayList<Int> cannot add(null)?
body: <pre class="lang-kotlin prettyprint-override"><code>fun main() {
      val stack = java.util.Stack&lt;Int&gt;();
      stack.push(null);
      val arr = java.util.ArrayList&lt;Int&gt;();
      arr.add(null);
  }
  </code></pre>
  <p>IDEA underlines the <code>null</code> in the 5th line with a red wavy line and warns that <em>Null can not be a value of a non-null type Int</em>. But It ignore the <code>null</code> in the 3rd line.</p>
  <p>And after deleting the fifth line, the program can run normally.</p>
  <p>why in Kotlin, Stack can push(null) but ArrayList cannot add(null)?</p>
  <p>Thanks.</p>