
AP CS A Quiz: Unit 1

Quiz
•
Computers
•
10th - 12th Grade
•
Medium
Karen Kikuchi
Used 579+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is NOT a Java primitive type
double
float
int
String
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements is true about variables?
The memory associated with a variable of a primitive type holds an actual primitive value.
When a variable is declared final, its value can only be changed through a direct reassignment.
A variable originally created as an int can be changed to store a double through casting.
All of these choices are true
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of x after this code runs?
int x = 5;
x = 10;
x = 4;
5
10
4
true
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the proper syntax to declare and initialize a variable called
temperature
to have the value
70.4?
int temperature = 70.4;
double temperature = 70.4;
temperature = 70.4;
temperature = (double) 70.4
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the result of this expression?
(int) (2 + 1 / 3 + 1)
2
3
3.33
4
0
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which expression returns the one’s place of an integer x like 23?
x % 10
x / 10
x % 100
x + 1
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of myInteger after this line of code is executed?
int myInteger = (int) 5.6;
6
5.6
5
9
0
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Java Math

Quiz
•
9th - 12th Grade
18 questions
Java Wiederholung

Quiz
•
12th Grade
22 questions
AP CSA Primitive Types Practice

Quiz
•
11th Grade
19 questions
Unit 4: Operators in Java

Quiz
•
9th - 10th Grade
15 questions
Programación con Java

Quiz
•
9th - 11th Grade
20 questions
Java Objects - Medium Practice Quiz

Quiz
•
12th Grade
23 questions
Unit 2 Quiz review

Quiz
•
12th Grade
19 questions
AP-Computer Science A

Quiz
•
12th Grade
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade