Quiz
Review today's material by taking this three-question quiz.
Questions
Which of the following is a valid value for a boolean variable?
"false"
false
10
Which of these conventions is not used when naming variables in Java?
Each successive word after the first in the variable name begins with a capital letter.
The first letter of the variable name is lowercase.
All letters are capitalized.
Which of these data types holds numbers from -32,768 to 32,767?
char
byte
short
Answers
b. In Java, a boolean can only be true or false. If you put quotation marks around the value, it will be treated like a String rather than one of the two boolean values.
c. Constant names are capitalized to make them stand out from other variables.
c.