Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Beginning Java
put values in the TreeMap
umut uzumcu
Ranch Hand
Posts: 43
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How can I put
unique_number(key) , name(value), surname(value), addres(value)
those information into the TreeMap? TreeMap takes 1 key and 1 value at a time, what is the way to put more value in the map for a key?
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No, Maps only support one value for a key. However, you can encapsulate your data in an object and store that instead of the three values.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
That's a very big dog. I think I want to go home now and hug this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Performing Math on Integer Class
When we use treeMap and input duplicate Key... the overided value is displayed... why is it notin hm
Bubble Sort Set using Comparator
sorting the values using Hsh Map
TreeMap
More...