File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Boolean vs boolean

 
Melinda Wilson
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dave Vick
Ranch Hand
Posts: 3244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic