• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue while using Map  RSS feed

 
sanjay kams
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using java.util.Map to store and retrieve values.
The problematic code is given below.



In the first line, I am getting map for exField.
In the second line, I an getting "null" as the value for valueMap.

I dont know, what I did wrong here. Could anyone help me to get out from this.


Thanks in Advance.
 
manish ghildiyal
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the second line, I an getting "null" as the value for valueMap.


Java documentation for this method says:

Returns:
the value to which the specified key is mapped, or null if this map contains no mapping for the key

So it means that value you pass to get method has no mapping.

Manish
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!