If your program is truely printing the message "ok" then I don't know. But if the userValidatin method is just returning true instead of false you need look no further than your initilization: boolean retval = true;
Follow the logic through, the if-else statement is useless (The validation is done as part of the query). The else part is unreachable.
Also, while your prepared statement will work as is.
You should check out the
JDBC tutorial to learn how take advantage of their benefits. It would save you having to single quote strings for one.