Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

urgent reply needed  RSS feed

 
siddha arunakanth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 3 values such as personname,category and favorites but i need to store them as key value pairs in an data structure in java and invoking the methods on that data structure.

i have the data like this

personname category favorite
Tom food pista
Tom car Toyata
arun car benz
arun food sweets



such data is there (i mean to say that repetations in data of individual columns is also there).
we need to write a program when user has given the personnameand category value we need to display the favorite value.
and in the same program if he enters the category or favorite value we need to display the count the number of persons having either that category or the favorite.

Please suggest some data structure which can store the key value pairs for doing above operations.
and suggest some code for to me also

Thanks
Arun
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this for information on why your poor choice of subject can actually prevent responses.

And then, please read this for more information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!