• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with hashmap  RSS feed

 
Kannan dumeelKannan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I have a multiple values associated with a key ,i am adding those values to list and adding the list to the particular key.Suppose a book is taken from a library at a particular date,it can be taken anytime next 30 days.previousMonthMap contains keys and asscoiated values for last month fetched books.currentmonthmap contains this month keys and values.keys being book name and values being different date fetched.If a book is fetched it can be free for next 30 days ,n number of times.i have to calculate usage for book gone out
Video fetched in current month also have to in 30 day barrier as days between 1 and 31 is 30days.
If the book is fetched on 12th of last month,18 of last month and 5th of current month,have to calculate diffrence between 12 of last month and 5th.
pls help.


when i calculate the difference in same month,it is skipping in the resultant vector. that is in the area prefixed with hh before adding to vector.can anyone help

[ May 07, 2008: Message edited by: Kannan dumeelKannan ]
[ May 07, 2008: Message edited by: Kannan dumeelKannan ]
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like an assignment, is it? (DoYourOwnHomework)
Anyways, I think you need to explain a little as to what have you done till now and where exactly are you facing a problem.
If something in the program you have given does not work, then let us know what.

P.S.: You have written the post nicely but a huge comment in your code:



Makes your post painfully wide. (I think lines within code blocks are not wrapped)
It will be great if you can edit and wrap the comment in two lines.
This will improve the readability of your post and help people help you!
This post will tell you how to edit your post.

Keep posting
[ May 07, 2008: Message edited by: Nitesh Kant ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!