Java CH4 - Control Statements EXIT

Java CH4 - Control Statements EXIT

Assessment

Flashcard

Computers

10th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

8 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Boolean values are: True / False, Yes / No, Right / Wrong

Back

True / False

2.

FLASHCARD QUESTION

Front

If you are checking the equality of two values, you should use:

Back

==

3.

FLASHCARD QUESTION

Front

How would you check for inequality? Options: =!, !=

Back

!=

4.

FLASHCARD QUESTION

Front

Java supports six relational operators that are used to make comparisons: ==, <, >, <=, >=, !=. True or False?

Back

True

5.

FLASHCARD QUESTION

Front

Is this code segment correct?
if(quizScore == 10);
  System.out.println("Perfect score");

Back

No

6.

FLASHCARD QUESTION

Front

You should use the "if, else" when you want to do one thing or nothing.

Back

False

7.

FLASHCARD QUESTION

Front

In a for loop, the change is stated in the for loop. The loop variable is then updated at the beginning (top) of the loop before any statements are executed.

Back

False

8.

FLASHCARD QUESTION

Front

Which for loop would print out (exactly):
1 2 3 4 5 6 7 8 9
Options:
int n = 10;
for(int i; i < n; i=i+1)
{
System.out.print(i + " ");
}
,
int n = 11;
for(int i=1; i < n; i=i+1)
{
System.out.print(i + " ");
}
,
int n = 10;
for(int i=1; i < n; i=i+1)
{
System.out.print(i + " ");
}
,
int n = 11;
for(int i = 1; i < n; i=i+1)
{
System.out.print("i");
}

Back

int n = 10;
for(int i=1; i < n; i=i+1)
{
System.out.print(i + " ");
}