Q2
After executing the following statements: int number = 7; number *= 3; What is the value of the variable number?
21
What does the expression 14 % 5 evaluate to?
4
Given the following statements: double number1 = 5.7; int number2 = (int)number1; What is the value assigned to the variable number2?
5
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 the following assignments is not legal in Java?
int number = 3.14;
Which of the following is a legal identifier?
myVariable
Which of the following statements does not increase the value of the variable number by 1?
number + 1;
Which of the following is the correct way to set the value of the variable number to 12?
number = 12;