DW.
DW.

Reputation: 71

String key not found in HashMap

I have what appears to be a very strange problem. I have a HashMap with one entry that has a key of "1". When I do a get by that key I get nothing back. I have no multi-threading, though everything is run in a Swing thread and the map is a member. Please see this screenshot of the debugger: http://img207.imageshack.us/i/keynotfound.png/

Thanks!

Upvotes: 1

Views: 2393

Answers (1)

unbeli
unbeli

Reputation: 30228

This is not "nothing", this is, most probably, an empty ArrayList, so the key is found correctly.

If you expect this to be something else and want to know why it isn't what you expect, the best place too look is the place where you put this value to the map.

Upvotes: 6

Related Questions