+ 3
Hello good afternoon. How to declare Boolean data type member as a null in default constructor ?
Boolean data type
8 Answers
+ 14
Boolean is a class. However, boolean is a primitive data type.
+ 12
A primitive type boolean cannot be null in java.
however...
A class type Boolean can be null.
try this..
btw the reason the output is null is becuase var boo is not affected as boo == null is infact true.
Boolean boo = null;
if (boo == null) {System.out.println(boo);}
+ 11
private boolean name = null != null;
+ 2
I tried it in eclipse, you have to put private boolean (variable) = null != null;. How is that possible?
+ 2
what is difference between Boolean and boolean?
+ 2
Boolean (capital B) is a wrapper class
boolean (small b) is a data type.
0
thanks guys