Which of the following is the correct way to set the value of the variable number to 12?
1 number = 12;
Which of the following is a legal identifier?
myVariable
Which of the following objects is used to display normal output to the screen?
System.out
Which of the following keywords is not required when declaring a named constant?
void
Which of following assignments is not legal in Java?
1 int number = 3.14;
Given the following statements:
1
2
double number1 = 5.7;
int number2 = (int) number1;
What is the value assigned to the variable number2?
5
Which of the following Java operators is used to perform multiplication?
*
What does the expression 14 % 5
evaluate to?
4
After executing the following statements:
1
2
int number = 7;
number *= 3;
What is the value of the variable number?
21
Which of the following statements does not increase the value of the variable number
by 1?
number + 1;