Purvesh Maheshwari

Greenhorn
+ Follow
since Dec 30, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Purvesh Maheshwari

Natallia Bahlai wrote:The second question is

Why i1 == i3 returns false?





When AUTO-Boxing done at line Integer i3=i2,new object implicitly generated and the int value is assigned to new object.when you trying to compare two different object using == then it will return false.

Also AUTO-Unboxing will be done while comparing one primitive type with object of respective wrapper class.
But NO AUTO (UNBOXING OR BOXING) operation happen while comparing two object using == operate.

Hope this will help you Natallia.