
APCSA Unit 2 Review
Authored by Julian HS]
Computers
Professional Development
Used 422+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
About
This Advanced Placement Computer Science A Unit 2 review quiz focuses on fundamental Java programming concepts that are essential for high school students typically in grades 11-12. The questions comprehensively cover Java String class methods including length(), indexOf(), substring(), and equals(), along with proper string concatenation and comparison techniques. Students must demonstrate understanding of primitive versus non-primitive data types, object-oriented programming basics, and the Math class methods such as sqrt(), pow(), abs(), and random(). The quiz also tests knowledge of escape sequences for console output formatting, method overloading principles, and mathematical operations with proper order of operations. To succeed on these problems, students need solid foundational knowledge of Java syntax, data type classifications, string manipulation techniques, mathematical function usage, and basic object-oriented concepts including the relationship between attributes and methods. This quiz was created by a classroom teacher who designed it for students studying AP Computer Science A at the high school level. The assessment serves as an excellent review tool for reinforcing core Java programming concepts before unit tests or AP exam preparation. Teachers can effectively use this quiz as a formative assessment to identify knowledge gaps in string methods and Math class functionality, or as homework to reinforce classroom instruction on data types and basic object-oriented principles. The varied question formats, including multiple choice and true/false items, make it suitable for both individual practice sessions and collaborative review activities. The content directly supports learning objectives outlined in AP Computer Science A standards, particularly those addressing primitive and reference data types (AP-CSA-2.A), string objects and methods (AP-CSA-2.B), mathematical operations and the Math class (AP-CSA-3.C), and fundamental object-oriented programming concepts (AP-CSA-1.D).
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type gets returned from length() method in String class?
double
String
int
number
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
What is the correct way to find the length of "txt" string?
int len = length(txt);
float len = txt.length();
int len = txt.length();
double len = length(txt);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose correct purpose of indexOf() in String class.
returns the index (the position) of the last occurrence of a specified text in a string
returns the character of the first occurrence of a specified character in a string
returns the index (the position) of the first occurrence of a specified text in a string (excluding whitespace)
returns the index (the position) of the first occurrence of a specified text in a string (including whitespace)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following?
String x = "10";
String y = "20";
String z = x + y;
System.out.println(z);
1020
10 20
30
"10 20"
5.
MULTIPLE SELECT QUESTION
1 min • 1 pt
What will be the output of below code?
String statement = "Outfit of the day";
System.out.println(statement.Substring(3,6));
it of
tfit
fit
FIT
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the return type of equals() method?
int
String
char
boolean
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the most appropriate way to check if two Strings are identical?
string1 == string2
string1.equals(string2)
string1.same(string2)
string1.equalsIgnorecase(string2)
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?
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
44 questions
Would you rather...
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
14 questions
Valentine's Day Trivia!
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development