Search code examples
javabooleandefault-value

Default value of 'boolean' and 'Boolean' in Java


What are the default values of boolean (primitive) and Boolean (primitive wrapper) in Java?


Solution

  • The default value for a Boolean (object) is null.
    The default value for a boolean (primitive) is false.