File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Booelan and null" Watch "Booelan and null" New topic

Booelan and null

Madulika Reddy

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

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

Joined: Mar 06, 2001
Posts: 13459

Moving to Java in General (beginner)
marc weber

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
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.


Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
I agree. Here's the link:
subject: Booelan and null
It's not a secret anymore!