Here Auto Boxing come in picture and Integer wrapper class convert to normal int type and than compare two int variable so It will return True in this case.
Assigned null to Actual value of the Array but in the Program 2)
Will Null the Second Refference to Array Object
e.g Lets Change line
with
Meance Now a1 -> OBJECT of Array and a2 -> OBJECT of Array Both Reffer the Same object if you mack a2=null; meance OBJECT of Array is not aloved for GC
Here spb is Super type Reference Variable So No definition find for as void method(Sub sb1) But Super is display because you can pass Sun instead of Super...
If you Try above Code it will gave Method not fount Exception.....