eclipse - If condition stopped working in my Java page connecting database -
public string function(string person, string area){ system.out.println("area"+area); //verified "null" obtained here if(area==null){ system.out.println("case1:"+area); } return area; }
i not getting print specified inside if condition why happening? database connecting page consists of 2100 lines of codes. can 1 tell me possible reason this? fed this. working fine before. :(
could area "null" , not null?
if case , area database value of type varchar try this:
if(area==null || area.tolowercase().equals("null")){
btw. not sure if tolowercase
needed.
and way :-) better.
if(area==null || "null".equals(area.tolowercase())){
anyway. null safetyness not necessary because of area==null.
if area
null whole if condition
true.
Comments
Post a Comment