Computer Applications
The default value of a boolean variable is:
- False
- 0
- false
- True
Values & Data Types Java
ICSE Sp 2025
4 Likes
Answer
false
Reason — In Java, the default value of a variable depends on its data type. For a boolean
variable, the default value is false
(in lowercase). This is because Java uses the primitive boolean
type, which has only two possible values: true
or false
.
Answered By
2 Likes
Related Questions
Method prototype for the method compute which accepts two integer arguments and returns true/false.
- void compute (int a, int b)
- boolean compute (int a, int b)
- Boolean compute (int a,b)
- int compute (int a, int b)
The statement that brings the control back to the calling method is:
- break
- System.exit(0)
- continue
- return
The method to convert a lowercase character to uppercase is:
- String.toUpperCase( )
- Character.isUppercase( char )
- Character.toUpperCase( char )
- toUpperCase ( )
Assertion (A): Integer class can be used in the program without calling a package.
Reason (R): It belongs to the default package java.lang.
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion(A)
- Assertion (A) is true and Reason (R) is false
- Assertion (A) is false and Reason (R) is true