
Java - Variables and Expressions Practice
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Jessica Guthrie
Used 8+ times
FREE Resource
Enhance your content in a minute
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
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
ICT as Social Change
Quiz
•
12th Grade
10 questions
C# lesson10
Quiz
•
1st - 10th Grade
13 questions
Networks
Quiz
•
7th - 9th Grade
10 questions
สอบย่อย ครั้งที่ 1 (BC.2/2)
Quiz
•
11th Grade
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
15 questions
Cyber Security Homework 1
Quiz
•
7th - 9th Grade
11 questions
BTEC DIT C3 B1 - Threats to Data
Quiz
•
11th Grade
15 questions
Ethical and Social Issues in ICT
Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
