Variables and their Data Types in JAVA
Quiz
•
Computers
•
9th Grade
•
Practice Problem
•
Easy
Cleon Barrett
Used 1+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. How is a variable in programming different from a variable in math?
A. In programming, a variable is always a letter that represents an unknown value.
B. In programming, a variable is a fixed number.
C. In programming, a variable stores a value and has a name, and the value can change.
D. There is no difference — they are the same in both math and programming.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. What is a variable and why do we use it in programming?
A. A variable is a command that makes the program repeat.
B. A variable is a reserved word used to start a method.
C. A variable is a name used to store data in a program so it can be reused or changed.
D. A variable is used only for doing math in a program.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. Match the following values to the correct Java data types.
a) "Hello"
A. int
B. string
C. Double
D. boolean
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. Match the following values to the correct Java data types.
b) true
A. char
B. String
C. boolean
D. int
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. Match the following values to the correct Java data types.
c) 75.5
A. boolean
B. double
C. int
D. float
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6. Match the following values to the correct Java data types.
d) 25
A. int
B. double
C. String
D. char
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7. Is this a valid variable name in Java? Why or why not?
int 2hot = 100;
A. Yes, it’s valid because numbers can be part of variable names.
B. No, because variable names can’t start with a digit.
C. Yes, because Java automatically converts numbers.
D. No, because you can't use the number 100 in Java.
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
11 questions
CAPÍTULO 1 NETWORKING ESSENTIALS
Quiz
•
1st - 12th Grade
8 questions
Overview of IT
Quiz
•
6th Grade - University
10 questions
Avaliação 1T - JavaScript
Quiz
•
9th - 12th Grade
10 questions
Innovations of Technology
Quiz
•
7th - 10th Grade
11 questions
Maintaining Hand Tools- CSS 9
Quiz
•
9th Grade
10 questions
NHTW Programming
Quiz
•
9th Grade
10 questions
Bài tập Tin học lớp 4
Quiz
•
1st - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
