Siva Masilamani wrote:Two different wrapper objects can be used in comparison operators but not with equality operators. like == or !=
but if I have a "Wrapper (== or !=) primitive", like
will work.
So, to make a general rule... If you have a comparison of two Wrapper objects it will work by unboxing and comparing except if you have == or !=. If you have a comparison of a Wrapper and a primitive it will work anyway because the Wrapper will unbox and it will be like comparing two primitives.
Please correct me if I'm wrong. I think this would be an important rule for the exam.