Q2

Ace your homework & exams now with Quizwiz!

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;


Related study sets

4.01 Histology of Uterus and Ovary

View Set

프랑스 필수 단어(amical-1)

View Set

Micro Exam 2: Streptococcus and Enterococcus

View Set