
AP Computer Science A - Quiz 1 Variables and Data Types
Authored by Christopher Dunn
Computers
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
10 questions
Logic Gates
Quiz
•
9th - 12th Grade
11 questions
Python Library-1
Quiz
•
12th Grade
10 questions
Latihan Soal Monitoring
Quiz
•
12th Grade
10 questions
Advanced HTML
Quiz
•
10th - 12th Grade
10 questions
Enterprise Computing_Quiz2Series
Quiz
•
12th Grade - University
10 questions
DA02: Sheet 1
Quiz
•
9th - 12th Grade
10 questions
Data Dictionary Quiz
Quiz
•
12th Grade
10 questions
PBO XII RPL
Quiz
•
9th - 12th Grade
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade