Multiple choice technology programming languages

The default value of boolean in java is

  1. true

  2. false

  3. 1

  4. -1

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, instance and class variables of type boolean are automatically initialized to a default value of false. The value true is not the default, and numeric values like 1 or -1 are incompatible with Java's boolean type.