AP CSA Full Review of Units 1-10 (2025)

0.0(0)
studied byStudied by 4 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:43 PM on 12/29/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

What data type do Java strings represent?

Strings are composed of characters (char), which is a primitive type.

2
New cards

What does the method length() do for strings in Java?

Returns the total number of characters in the string.

3
New cards

What does the substring(int from, int to) method return?

Returns a new string starting at index 'from' and ending just before index 'to' (to is exclusive).

4
New cards

What will the indexOf(String str) method return if 'str' is not found in the string?

Returns -1.

5
New cards

What does the equals(String other) method do?

Checks if two strings contain the same characters in the same order.

6
New cards

What is the purpose of the Math class in Java?

Provides static methods for common mathematical calculations.

7
New cards

What does the static method abs(int x) return?

Returns the absolute value of the integer x.

8
New cards

What does the static method random() return in the Math class?

Returns a random double in the range [0.0,1.0).

9
New cards

What is the significance of zero-based indexing in Java strings?

The first character is at index 0, and the last character is at index length()-1.

10
New cards

How does the max(int a, int b) method behave?

Returns the larger of two values.

11
New cards

What type of values can be stored in an ArrayList?

ArrayLists can store multiple types if the type isn鈥檛 specified.

12
New cards

What happens if you try to access an index less than 0 or greater than or equal to length() of a string?

It will throw a StringIndexOutOfBoundsException.

13
New cards

What does the compareTo(String other) method do?

Compares strings lexicographically and returns an integer indicating their relative order.

14
New cards

What does substring(int from) return?

Returns a new string starting at index 'from' and going to the end of the string.

15
New cards

How can you concatenate two strings in Java?

Using the + operator to join strings or a string and a primitive.

16
New cards

What is a key feature of arrays in Java regarding size?

The size of arrays cannot be changed after they are created.