GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Booelan and null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Booelan and null" Watch "Booelan and null" New topic
Author

Booelan and null

Madulika Reddy
Greenhorn

Joined: Mar 11, 2003
Posts: 10
The field is declared as Booelean. How can we check if we have null in this field.

Regards,
Madhulika
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
Is this a servlet question or a general java one? If it is general java, you should post it in the appropriate forum. If it has something to do with servlets, I am having trouble understanding your question. What field? An attribute? A parameter? Please be more specific so we can help.


“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Moving to Java in General (beginner)
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343



"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tom Blough
Ranch Hand

Joined: Jul 31, 2003
Posts: 263
If it is Boolean, the Object wrapper for the boolean type, then you can test for null the same way you test any other Java object for null as a previous poster already pointed out.

If it is boolean, then it is a primitive type that can contain only the values True or False. It cannot be null.

Cheers,


Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
 
GeeCON Prague 2014
 
subject: Booelan and null