• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple columns on hashmap  RSS feed

 
shaf maff
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

Is there anyway you can use multiple columns on hash maps ? For example:

 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java api is your best friend. If you go there, and look at the HashMap class, you'll see that the put method ONLY takes two parameters.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually when you want to do this, it's an indication that you need to define a new class to group together related data items. I can't quite tell what your data represents, so I won't suggest a name for it, but in general, that's what you probably need to do.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!