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
A. A Java keyword
B. A Boolean literal
C. Same as value 1
D. Same as value 0
Answer: Option B
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??