Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

HashMap

 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • Mark post as helpful
  • send pies
  • Report post to moderator


---------- java ----------
Bru
Nescafe
6
3
Connection closed

Output completed (1 sec consumed) - Normal Termination

Here i've to declare two separate HashMap objects to store and iterate individually.How could i do in one HashMap ?
Thanks
 
Phil English
Ranch Hand
Posts: 62
MySQL Database Netbeans IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Could you create a new order class which has type and quantity fields? You could then create order objects and then place these into a hashmap?
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • Mark post as helpful
  • send pies
  • Report post to moderator
Phil English wrote:Could you create a new order class which has type and quantity fields? You could then create order objects and then place these into a hashmap?


Yes,it worked.Thanks
 
    Bookmark Topic Watch Topic
  • New Topic