Computer Applications

Assertion (A): The boolean data type in Java can have only two possible values: true or false.

Reason (R): Boolean values in Java are stored as integers, with true represented by 1 and false by 0.

Values & Data Types Java

1 Like

Answer

Assertion (A) is true and Reason (R) is false

Explanation

  • Assertion (A):

  • True. The boolean data type in Java can only hold two possible values: true or false.

  • Reason (R):

  • False. In Java, boolean values are not stored as integers. Java uses a special type to represent boolean values directly, without associating them with 1 or 0.

Answered By

2 Likes


Related Questions