Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to check whether an variable of type int is null

800601Dec 18 2008 — edited Dec 29 2008
Hi


Pls any one tell me how to check the value of integer type variable is null or not ???

int a ;

if(a != null)


Err :-
The operator != is undefined for the argument type(s) int, null
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 26 2009
Added on Dec 18 2008
5 comments
539 views