
AP Computer Science A - Quiz 1 Variables and Data Types
Interactive Video
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Christopher Dunn
Used 1+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a string variable in Java?
string var = "This is a string";
string var = 'This is a string';
String var = 'This is a string';
String var = "This is a string";
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct declaration of an integer variable?
int num1 = 10.5;
int num1 = 10;
boolean num1 = 10;
double num1 = 10;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a double variable with a value of 11?
double num1 = 11;
double num1 = 11.0;
int num1 = 11.0;
boolean num1 = 11.0;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'final' keyword do when declaring a variable?
It allows the variable to be changed later.
It makes the variable accessible only within the class.
It makes the variable a global variable.
It prevents the variable from being reassigned.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid boolean declaration?
boolean isTrue = 'true';
boolean isTrue = TRUE;
boolean isTrue = True;
boolean isTrue = true;
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
11 questions
FlowCharts
Quiz
•
9th - 12th Grade
10 questions
Informatics Overview
Quiz
•
12th Grade
10 questions
I Can Code!
Quiz
•
KG - University
10 questions
Python-Quiz-Basic-Datatypes
Quiz
•
12th Grade - Professi...
10 questions
Repetitive Strain Injury
Quiz
•
9th - 12th Grade
11 questions
Цикли While i Repeat
Quiz
•
8th - 12th Grade
10 questions
Javascript & Client side scripting
Quiz
•
10th - 12th Grade
8 questions
Career Skills
Quiz
•
KG - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
