Consider the following lines of code:
Integer i = new Integer (42); Long v = new Long (42); Double d = new Double (42.0);
Which of the following options are valid?
Select 3 options
Correct Options are : C D E
If the compiler can figure out that something can NEVER happen, then it flags an error.
The compiler knows that v, i or d can never point to the same object in any case because they are references to different classes of objects that have no relation between themselves.