This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

key-class and value-class elements  RSS feed

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In following code snippet



How could it possible to have a key of type int and value of type BigDecimal?
 
Tim Holloway
Bartender
Posts: 18661
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the key and the value are 2 completely different objects. A Map is something that connects keys and values and provides the mechanism where when you supply the key its corresponding value object is returned.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!