I'm working on Library management project in which there is one column "available". I'm fetching value from it. if a value is "Yes" then only a new book will be issued. here is the code that I have tried.
try {
String a = checkStatus();
String b = "Yes";
System.out.println("a: "+a);
System.out.println("b: "+b);
if(a.equalsIgnoreCase(b))
{
System.out.println("working in if");
}
else
{
System.out.println("shoot! Fallout :(");
}
} catch (SQLException ex) {
Logger.getLogger(IssueBook.class.getName()).log(Level.SEVERE, null, ex);
}
Output:
a: Yes
b: Yes
shoot! Fallout :(
it should have return true instead of false. Where I'm making mistake? Thanks!