Hi All,
I have a
java class where I am using an if condition. The code for the class is :
When I run this, the output that I get is
1 ADMIN
2nd loop - role derived from DB is: ADMIN
Thus, it looks like
= 1 and
= ADMIN, still the if condition fails.
To understand this better, I did a few tests.
When I used
, the
test passed.
When I used
, the test passed again.
Hence, the only time this doesnt seem to work, is when role is given the value of rs.getString(2) (which is odd...because in the sysout statement
, the output clearly shows that the value of rs.getString(2) is indeed
ADMIN
Can anyone please help me understand what is going wrong here?
Thanks in advance for your time and patience.