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
Similar Resources on Wayground
11 questions
Java Boolean Statements

Flashcard
•
11th Grade
15 questions
Unit 5 Lessons 0 & 1

Flashcard
•
10th Grade
18 questions
AP CSA Unit 1 Review

Flashcard
•
10th - 12th Grade
8 questions
2D array flashcard

Flashcard
•
9th - 12th Grade
10 questions
Arrays

Flashcard
•
10th - 12th Grade
10 questions
Arrays

Flashcard
•
10th - 12th Grade
12 questions
Topic 1 C++ Programming

Flashcard
•
12th Grade
11 questions
Java String Objects & Methods

Flashcard
•
12th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
7 questions
EAHS PBIS Lesson- Bathroom

Lesson
•
9th - 12th Grade
57 questions
How well do YOU know Neuwirth?

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade
4 questions
Study Skills

Lesson
•
5th - 12th Grade
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
20 questions
Points, Lines & Planes

Quiz
•
9th - 11th Grade