Object d = x; // d =null
Can anyone explain lines 4&5 please? What does d refer to?
Integer as = 303;
System.out.println(as==lo); // Line 1
The compiler will throw error in line 1 as compiler cannot unbox Integer and Type case it to Long at the same time.
Have you tried to compile the above code? There is no issue with the above code and it compiles without any errors and prints o/p: true