Only smart people read this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Only smart people read this

Sorry lol, my question has not been answered yet, so im using a bit of psychology to get more people to read my scenario.. Can you help me? Question - how do i do the following - " When inserting a new book into the library the system checks using the book ISBN number if the book is already present in the library database and if it is presents only the number of copies for that book is increase. My code is to long to paste in this bracket,either way could someone help me out.

1st Apr 2017, 10:41 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
7 Answers
+ 1
wouldnt you just use a hashmap?
1st Apr 2017, 10:42 PM
Edward
+ 1
map.put ("isbn number...", count)
1st Apr 2017, 10:42 PM
Edward
+ 1
so are you trying to do this in java specifically or any language?
1st Apr 2017, 10:47 PM
Edward
+ 1
if this is for a little side project then yes i would suggest looking into Hashmap, otherwise if this is for something important, i suggest a database like mysql
1st Apr 2017, 10:53 PM
Edward
0
hashmap? i only started learning this aspect of java 7 hours a go so im a bit rusty. Point being i will need to research it- thanks. If anyone has any other solutions, please feel free to comment.
1st Apr 2017, 10:46 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
0
specifically java. My goal is to make it such that when someone enter an existing book, the qnty ++ and if i lend a book out, the qnty --
1st Apr 2017, 10:49 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
0
i need to do it with out a sql server, anyway thanks!
1st Apr 2017, 10:58 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar