Program for RFID based book shelving system

I have taken up a RFID based project. I'm going to implement it through Arduino Uno. My project is about displaying the shelf number where the book is supposed to be placed after reading the tag number of the book. So basically I want to store all the tag numbers before and then while reading the tags one by one want to compare the read tags with the stored tag numbers and if the tags match, display the corresponding shelf number.
I'm having problem in program since I dont know the basics of Java, if somebody could help in telling how to compare the tags while reading with the known tag numbers and then displaying the shelf number on LCD , it would be great.

Hello, diksha, what about using MySQL saving information of books?
Link to library:

Also, you need ethernet shield.

Regards, Kobnstantin.