Home
Explore
Exams
Search for anything
Login
Get started
Home
Engineering
AP Computer Science A
AP CSA Unit 2: Lesson 1 Questions
0.0
(0)
Rate it
Studied by 310 people
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Card Sorting
1/9
Earn XP
Description and Tags
Computer Science
AP Computer Science A
Add tags
Study Analytics
All
Learn
Practice Test
Matching
Spaced Repetition
Name
Mastery
Learn
Test
Matching
Spaced
No study sessions yet.
10 Terms
View all (10)
Star these 10
1
New cards
Which of the following lines of code create a String variable z and set it equal to the word "Strings are String-y"?
String z = "Strings are String-y";
2
New cards
Consider the following code:
String a = "determined";
String b = "learner";
System.out.println(a + "-" + b);
What is the output?
determined-learner
3
New cards
Consider the following code:
int a = 43;
int b = 17;
System.out.println(a % b);
What is the output?
9
4
New cards
_____ data types can hold many pieces of information at a time.
class
5
New cards
Java allocates a space in memory called a(n) _____.
reference
6
New cards
To define an empty variable, ____ keyword can be used.
null
7
New cards
Which of the following would set the String variable hobby to be completely empty (i.e. not even storing a memory address)?
String hobby = null;
8
New cards
Which of the following are true about class data types? Click all that apply.
can hold multiple pieces of data of different types
can be created
can be customized
9
New cards
Consider the following code:
String a = "first";
String b = a;
a = "second";
System.out.println(a + " " + b);
What is printed when the code is run?
second first
10
New cards
Consider the following code:
String a = "first";
a = "second";
String b = a;
System.out.println(a + " " + b);
What is printed when the code is run?
second second
Explore top notes
Chapter 1: The Comparative Method
Updated 769d ago
Note
Preview
Chapter 7- Inside the Cell
Updated 858d ago
Note
Preview
Chapter 15: Pronoun and Noun Agreement
Updated 702d ago
Note
Preview
Iliaca interna o hiposgástrica
Updated 904d ago
Note
Preview
Chapter 7: Conflict and American Independence (1754–1800)
Updated 761d ago
Note
Preview
Stages of fetal development
Updated 24d ago
Note
Preview
Chapter 18: Amino Acids and Proteins
Updated 951d ago
Note
Preview
Key Operant Conditioning Concepts to Know for AP Psychology (AP)
Updated 162d ago
Note
Preview
Explore top flashcards
Econ test 2
Updated 123d ago
Flashcards (71)
Preview
evolutieleer 2.5 woorden
Updated 853d ago
Flashcards (20)
Preview
Chapter 9: Energy, power and resistance
Updated 538d ago
Flashcards (24)
Preview
Visual computing part 2
Updated 845d ago
Flashcards (71)
Preview
NSG-119 Exam 1
Updated 249d ago
Flashcards (81)
Preview
Final Orgo Lab
Updated 660d ago
Flashcards (65)
Preview
5. Body Structures [Word Elements]
Updated 816d ago
Flashcards (45)
Preview
Unit 5: Conflict, Crisis, and Reaction in the Late 18th Century
Updated 774d ago
Flashcards (54)
Preview