Does Java allow nullable types?

No.

Instead, you can use the boxed Boolean class (which is an ordinary class rather a primitive type), or a three-valued enum.

Leave a Comment