Java Conditions and If Statements

Java Conditions and If Statements

10th Grade

10 Qs

quiz-placeholder

Similar activities

Java Print Statements Warm-Up

Java Print Statements Warm-Up

9th - 12th Grade

10 Qs

Java If Else

Java If Else

9th - 12th Grade

10 Qs

Loops 101 DW Quiz

Loops 101 DW Quiz

9th - 12th Grade

10 Qs

COMPUTER 10, SEMI-FINALS

COMPUTER 10, SEMI-FINALS

10th Grade

13 Qs

uCertify JavaScript Chapter 6 Test

uCertify JavaScript Chapter 6 Test

9th Grade - University

15 Qs

CO - 2_ Quiz 1_Python Conditionals

CO - 2_ Quiz 1_Python Conditionals

10th Grade - University

15 Qs

Chapter 04 Worksheet

Chapter 04 Worksheet

10th Grade

10 Qs

Control Structures - Selection in Python

Control Structures - Selection in Python

8th Grade - University

11 Qs

Java Conditions and If Statements

Java Conditions and If Statements

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Myra Ungriano

Used 14+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is not included in Java Conditional statements?

if

else

else if

switch

none

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement is used to specify a block of code to be executed if a specified condition is false?

if

else

else if

switch

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax to check if a variable 'x' is greater than 10 in Java?

if x > 10

if x >= 10

if x < 10

if x <= 10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a comparison operator in Java?

==

<=

&&

!=

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When should you use the else if statement in Java?

To specify a block of code to be executed if a specified condition is true.

To specify many alternative blocks of code to be executed.

To specify a new condition to test, if the first condition is false.

To specify a block of code to be executed if the same condition is false.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for a switch statement in Java?

switch { }

switch (expression) { }

switch expression { }

switch (expression) { case: }

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement would you use to specify many alternative blocks of code to be executed?

if

else

else if

switch

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?