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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
put values in the TreeMap
umut uzumcu
Ranch Hand
Posts: 43
posted 17 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 17 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
This tiny ad is wafer thin:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
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...