In the Java programming language, extension and boxing do not work, but how does it work in the following example?
final short myshort = 10;
Integer iRef5 = myshort;
Why does this work? Is this not the same as an extension and then a window?
But if I write the following code:
final int myint = 10;
Long myLONG = myint;
why doesn't it work?
source
share