posted 18 years ago
I ran the following code,
and I got the same answer as the book, 4 3. However, I don't understand why
the answer is not 3 3. Since s is of type Short, couldn't you box short to Short, then widen Short to Integer? The only answer I can think of is maybe because Short is now an object not a primitive, it is a subclass of Number, not Integer? Is that correct?