The future belongs to those who believe in the beauty of their dreams.Dream BIG!
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Nabila Mohammad:
...I know when put() is called hashCode() is implicitly called to store in the right "bucket" and equals() is called to make sure there is no duplicate objects.
But which two objects are being compared - like in the case of
m.put(t1,"Do laundary");
( Ther is only one object here)...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Also, which two objects are being compared in equals() when put() is called.
I know when put() is called hashCode() is implicitly called to store in the right "bucket" and equals() is called to make sure there is no duplicate objects.
But which two objects are being compared - like in the case of
m.put(t1,"Do laundary");
( Ther is only one object here)
The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Originally posted by Nabila Mohammad:
...Am I thinking on the right track...?!?!
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
That was a brilliant example! [thumb]
Cleared a lot of my doubts regarding the comparision that takes place.
Don't get me started about those stupid light bulbs. |