consultkp
asked on
checking data in int and long variables? urgent !...
hello experts,
I want to check wether an "int" variable has any data or not.
but if I do like this -
int a;
---
---
if(a == null){
-----
}
then it is saying that operator == is not defined for int and null.
is the default value of int and long variables are 0 ? if so can I do like this if( a == 0) then does it mean that it has no data ?
so please suggest me how to check whether an int or a long variable has any data or not ?
thank you .
I want to check wether an "int" variable has any data or not.
but if I do like this -
int a;
---
---
if(a == null){
-----
}
then it is saying that operator == is not defined for int and null.
is the default value of int and long variables are 0 ? if so can I do like this if( a == 0) then does it mean that it has no data ?
so please suggest me how to check whether an int or a long variable has any data or not ?
thank you .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(The same goes for long)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks a lot for answering , and also understanding what I mean with "urgent", thank you I am continuing with my work, have nice time over there.
babaii
kiran.
babaii
kiran.
:-)
glad to help