Someone e-mailed me this question. Normally I just say to use the forums. But I really want to answer this one. So posting the question here.
I was hoping you could help me with a question I had in Java. So I'm
using a Result Set to get a result. However, one of my strings has a
null value. I've tried:
If(rs.getString("gender")==0)
If(rs.getString("gender")==null)
If(rs.getString("gender").equals(""))
If(rs.getString("gender").matches(""))
but none of them work. Can you please tell me how to check if the
'gender' field is null or not?