aspose file tools*
The moose likes Beginning Java and the fly likes Boolean vs boolean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Boolean vs boolean" Watch "Boolean vs boolean" New topic
Author

Boolean vs boolean

Melinda Wilson
Ranch Hand

Joined: Jul 05, 2001
Posts: 35
Can someone help me understand why I have an error that says "Type mismatch cannot convert from Boolean to boolean".
Confused about Boolean and boolean.
Thanks!
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
A boolean is a primitive. A Boolean is an object that does nothing other than hold a boolean so you can deal with those things that are so picky that they only hold Objects.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Melinda
I am assuming you have a Boolean that you need to get into a boolean. You can use the booleanValue method in the Boolean class. It takes a Boolean object and returns the value of it as a boolean. Something like this:

hope that helps
Dave

did I say boolean/boolean enough in that post?

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Boolean vs boolean