Widening and boxing with java <p>In Java programming language widen and boxing doesn't work, but how does it work in following example?</p> <pre><code>final short myshort = 10; Integer iRef5 = myshort; </code></pre> <p>Why does this work? Is this not the same as widen and then box?</p> <p>But if I write the following code:</p> <pre><code>final int myint = 10; Long myLONG = myint; </code></pre> <p>why it doesn't work?</p>