P
pbd22
Hi.
I have a user object and I want to check for nullity.
I want to know if no data has been entered for this
particular object (ie. the user just hit submit w/o
registering... assuming no client validation).
I use:
if (user == null)
which I think is correct. but, i get false. I think the
reason is that the default value for an Int is 0 and
therefor the object is not completely null?
user.first = null
user.last = null
user.day = 0
user.moth = 0
user.year = 0
user.city = null
etc...
thoughts?
thanks.
I have a user object and I want to check for nullity.
I want to know if no data has been entered for this
particular object (ie. the user just hit submit w/o
registering... assuming no client validation).
I use:
if (user == null)
which I think is correct. but, i get false. I think the
reason is that the default value for an Int is 0 and
therefor the object is not completely null?
user.first = null
user.last = null
user.day = 0
user.moth = 0
user.year = 0
user.city = null
etc...
thoughts?
thanks.