I am trying to build a library management desktop app by netbeans.
I succeeded in connecting database and adding new book and member information in database table.
Now I have tried to search information by id in table that is unique and want to show related information somewhere, such as in a Label or in a Text Field but I don't know the coding for that.
I have learned simple core java and before it a use discretionary and list to Store my infomation but in database connection how can I use if else clause ex.:
if(list-name.contains (book id))
{
system.out.println("the book id already registered.");
}
else
{
system.out.println("tthis book id is available.");
}
How can I write such as expression for database tables?