I have a below code
int id = rs.getInt("regID")
the regID column got null values in it, I want to assign 0 if the value is null, i tried
if(rs.getInt("regID ") == null){
regID=0;
}
nut it gave me below error
incomparable types: int and <nulltype>
Please anyone advice me how to handle null values from database in
java.
Thanks