Java - Variables and Expressions Practice

Java - Variables and Expressions Practice

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

To Change or Not to Change?

To Change or Not to Change?

12th Grade

10 Qs

Threats to Data

Threats to Data

9th - 12th Grade

11 Qs

HEALTH AND SAFETY 9

HEALTH AND SAFETY 9

7th - 9th Grade

11 Qs

Chapter 7: System life cycle

Chapter 7: System life cycle

9th - 11th Grade

15 Qs

OCR GCSE CS - 2.1 ERL sorts and searches

OCR GCSE CS - 2.1 ERL sorts and searches

10th - 11th Grade

9 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

MEDIA AND INFORMATION LITERACY

MEDIA AND INFORMATION LITERACY

12th Grade

10 Qs

Review for Midterm Test ICT 3

Review for Midterm Test ICT 3

1st - 11th Grade

15 Qs

Java - Variables and Expressions Practice

Java - Variables and Expressions Practice

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Jessica Guthrie

Used 8+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid Java variable name?

10thousand

_squareValue

$earned

amount_remaining

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You need three things to declare a variable in Java.

The datatype, ; at the end, and...

the variable name

an equal sign

//at the beginning

the variable size

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following lines of code correctly declares a variable with a proper Java variable name?

boolean isOff;

Int size;

double $saved;

string FirstName;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following lines of code correctly declares AND initializes a variable with an appropriate value?

boolean isOff = yes;

int size = 500.8;

double saved$ = 400.0;

String firstName = Tuna;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When dividing two ints in Java, the answer will be an int.

For example: 10/3 = 3

TRUE

FALSE

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the expression below.

2 + 6 * 4 - 5

21

27

-4

-8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the expression below.

(4 + 3) * 2 - (19 / 5)

11

10.2

-7

25

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?