Nidhi Sar wrote:
Why is equals() method giving a false result here?
It is giving a false as the result because boxing a long primative yields a Long object -- and an Integer object is never equal to a Long object.
As for the comparison operator... when a comparison is done between a primative and a wrapper, unboxing the done with the wrapper -- meaning the comparison is done with primatives.
Henry