Boolean
wrapper is useful when you want to whether value was assigned or not apart from true
and false
. It has the following three states:
null
Whereas boolean
has only two states:
The above difference will make it helpful in Lists of Boolean
values, which can have True
, False
or Null
.