Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Boolean vs boolean
Joined: Jul 05, 2001
Aug 02, 2001 12:06:00
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.
Joined: Sep 29, 2000
Aug 02, 2001 12:14:00
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
Joined: May 10, 2001
Aug 02, 2001 15:09:00
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:
... Boolean wrappedB = new Boolean("true"); boolean b = wrappedB.booleanValue(); // the boolean b now has the value true ...
hope that helps
did I say boolean/boolean enough in that post?
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Boolean vs boolean
why(boolean b3=true;)(Boolean b4=true;)is both right?
Hide and unhide panel
JTable type yes/no
WA #1.....word association
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013