AP CSA Primitive Types Practice
Flashcard
•
Computers
•
11th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

16 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is a variable in programming?
Back
A variable is a named storage location that holds a value.
2.
FLASHCARD QUESTION
Front
Which of the following options are primitive data types in Java? integer, boolean, double, String
Back
integer, boolean, double
3.
FLASHCARD QUESTION
Front
What is the syntax for declaring a variable in Java?
Back
int myVariable;
4.
FLASHCARD QUESTION
Front
What is the difference between int and double data types?
Back
int is used for whole numbers while double is used for decimal numbers.
5.
FLASHCARD QUESTION
Front
What is the purpose of a variable?
Back
To store and manipulate data in a program.
6.
FLASHCARD QUESTION
Front
Consider the following code segment.
System.out.println("W");
System.out.println("X");
System.out.print("Y");
System.out.print("Z");
What is printed as a result of executing the code segment?
Back
W
X
YZ
7.
FLASHCARD QUESTION
Front
Consider the following code segment:
int x = 10;
int y = 20;
/* missing code */
System.out.print(top / bottom);
Which of the following replacements for /* missing code */ will cause an ArithmeticException to occur?
I. int top = x - y;int bottom = y - x;
II.int top = 2 * x;int bottom = y - top;
III. int top = x + y;int bottom = 2 * top;
Back
II. only
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
13 questions
[AP CSP] Binary Conversion
Flashcard
•
9th - 12th Grade
9 questions
Sorting Algorithms
Flashcard
•
9th - 12th Grade
15 questions
Verbs and prepositions
Flashcard
•
12th Grade
10 questions
Introduction to MySQL
Flashcard
•
KG
10 questions
Main Idea
Flashcard
•
11th Grade
10 questions
KUIZ PENDIDIKAN MORAL TINGKATAN 5 UNIT 4
Flashcard
•
10th - 11th Grade
15 questions
Persamaan Lingkaran
Flashcard
•
11th Grade
15 questions
The Genre of Science Fiction
Flashcard
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade