thanks buddy. i have some further doubt:
Bhagirathi Mallick wrote:When you use == operator primitive type with its corresponding Wrapper Class object,
then the Corresponding Wrapper class object unboxing to corresponding primitive type
and then comparison stats, So the out put like this(For line no 6 and 7).
in case of a switch statement, how is the case constant compared to the swtich expression? i guess it uses == for comparing and matching. if i am correct so far then as shown in my second example regarding switch in my primary post, int is being compared to Integer and instead of unboxing Int to int, int is being autoboxed to Int. is it an exception to the rule? or please correct me.
Many Thanks