I would like to understand the difference between the Boolean
and boolean
types in Java, specifically as they relate to GWT. I know that methods are not supported but I want more info if it is available.
boolean is a primitive and Boolean is as object wrapper. So boolean, is the type whose values are either true or false while the other is an object.
8 Answers. Show activity on this post. Yes you can use Boolean / boolean instead. First one is Object and second one is primitive type.
false is a primitive and Boolean. FALSE is an object, so they're not really comparable.
It's fairly Simple and the same for GWT and Java:
So unless you need the NULL (like for example your loading the field from the database, and you want NULL to be different to false) then stick to boolean.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With