Hi guys,
Sorry for the newb question... I do understand why prints false while prints true (because == tests for value equality between two primitives, but for reference equality between two objects, and value1 and value2 are actually objects (of the class Double)), but then why prints true?
Since value5 and value6 are objects (of the class Integer), shouldn't == test for reference equality, thus return false? (like it does for value1 and value2 with the class Double)
Thanks in advance guys.
Have a great day ;-)
[fixed code tags]
Sorry for the newb question... I do understand why prints false while prints true (because == tests for value equality between two primitives, but for reference equality between two objects, and value1 and value2 are actually objects (of the class Double)), but then why prints true?
Since value5 and value6 are objects (of the class Integer), shouldn't == test for reference equality, thus return false? (like it does for value1 and value2 with the class Double)
Thanks in advance guys.
Have a great day ;-)
[fixed code tags]