In Java, the word true is ................
A. A Java keyword
B. A Boolean literal
C. Same as value 1
D. Same as value 0
Answer: Option B
Join The Discussion
Comments ( 6 )
Related Questions on Data Types and Variables
What is the maximum value that can be stored in a byte variable in Java?
A. 127
B. 255
C. 32767
D. 64
What is the default value of an int variable in Java if it's not explicitly initialized?
A. 0
B. 1
C. -1
D. Null
Which of the following is not a valid identifier for a Java variable?
A. my_var
B. _myVar
C. 3rdVar
D. $var
Any constant value which can be assigned to the variable is called literal/constant
eg: int x=100; //here 100 is literal
boolean b=true; // here true is literal
Any constant value which can be assigned to the variable is called literal/constant
eg: int x=100; //here 100 is literal
boolean b=true; // here true is literal
Actually There a 53 "Reserved Words" are there in java (not keywords)
That 53 "Reserved Words" in java and they are divided into two categories...
1) Keywords (48)
2) Reserved Literals (3)
that 3 "Reserved Literals" are true,false,null.
And keywords are like if,else,break......( And further you know very well )
please explain it
I known that it is a keyword
What logic will used
how this is possible??