By Ananth, Bangalore
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
By Ananth, Bangalore
By Ananth, Bangalore
Originally posted by CM Ananth:
I feel there won't be any use case for adding NULL as a key and store a value for it. I wonder why such a feature is allowed by java and some real world examples will help me to understand the use of this feature.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joanne
Brian Carlisle wrote:Hello - i was running some basic code tests to try and do this and keep getting a runtime exception whenever i add another element to the Map/Set after putting a null key initially. Seems that it always fails on the equals method when comparing the current object being inserted to the previous null entry. This makes sense so i am curious how this is implemented in the real world. A bit confused..
Joanne
Steve
Brian Carlisle wrote:
Steve
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Space pants. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|