
Java - Variables and Expressions Practice

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Jessica Guthrie
Used 7+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Unit 5: Input in Java

Quiz
•
9th - 10th Grade
11 questions
#124 Unit 2 Lesson 6 Variables

Quiz
•
11th Grade
13 questions
Java 1

Quiz
•
11th Grade
15 questions
Java Level 1 - A

Quiz
•
12th Grade
15 questions
Class X - Java 1

Quiz
•
10th Grade
15 questions
Programación con Java

Quiz
•
9th - 11th Grade
10 questions
Python Programming

Quiz
•
7th - 9th Grade
11 questions
J277 Programming - Data Types

Quiz
•
9th - 11th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade