what is the difference among bool, boolean and Boolean in Java/android.
+3
A:
bool does not seem to exist, at least I can't find references to it.
boolean is a primitive boolean type, not an object.
Boolean is the wrapper object for a boolean.
Thomas Lötzer
2010-08-10 14:39:41
+5
A:
boolean is a java primitive type. It only accepts true or false (which are declared constants in java).
Boolean is a Serializable wrapper of boolean primitive type. From the JDK....
The
Booleanclass wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type isboolean.
bool doesn't exist in java, but it does in Android as R.bool.
The Elite Gentleman
2010-08-10 14:42:50
So what is Android's R.bool for?
bruceboughton
2010-08-10 14:46:40
I've heard of `android.R` but I have no clue what it's uses are...maybe it's for the R programming language.
The Elite Gentleman
2010-08-10 14:50:58
Ah! `R.bool` is a "resource type" in Android. God only knows why Google decided to ignore Java identifier conventions with the name.
Stephen C
2010-08-10 15:01:55