FRQ KEYWORDS STUDY APCSA 2025-2026

0.0(0)
Studied by 1 person
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/46

flashcard set

Earn XP

Description and Tags

Lowk just used claude 4.5 sonnet, the goat.

Last updated 10:46 PM on 5/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

47 Terms

1
New cards

For each [item] in [list/array]

for (Type item : list) — use when you don't need the index

2
New cards

For each index from 0 to n

for (int i = 0; i < n; i++) — use when index matters or you need to modify elements

3
New cards

Traverse the array/list

for (int i = 0; i < arr.length; i++) OR for (Type x : arr) — "traverse" just means loop through every element

4
New cards

While [condition] is true

while (condition) { … } — keep looping until the condition becomes false

5
New cards

Repeat for each hour / each element (inclusive range)

for (int i = start; i <= end; i++) — inclusive means use <= not <

6
New cards

Accumulate / keep a running total

int total = 0; total += value; — always initialize before the loop

7
New cards

Count the number of [items] that…

int count = 0; if (condition) count++; — increment inside the loop when condition is met

8
New cards

Find the minimum / maximum

int best = list.get(0); for (int x : list) if (x > best) best = x; — initialize with first element, not 0

9
New cards

If at least one of the following is true

if (condA || condB) — || is OR, true if either side is true

10
New cards

If all of the following are true

if (condA && condB) — && is AND, both must be true

11
New cards

If [x] is between [a] and [b], inclusive

if (x >= a && x <= b) — inclusive means include the endpoints

12
New cards

If [x] is between [a] and [b], exclusive

if (x > a && x < b) — exclusive means exclude the endpoints

13
New cards

If none of / not

if (!condition) — ! flips true to false and vice versa

14
New cards

Otherwise / in all other cases

else { … } — runs when none of the if/else if conditions matched

15
New cards

The larger/smaller of two values

Math.max(a, b) / Math.min(a, b) — no need to write your own if/else

16
New cards

Bonus / additional amount if condition

if (condition) total += bonus; — add the bonus inside a conditional, after the base amount

17
New cards

The number of elements in the array

arr.length — no parentheses, length is a field not a method

18
New cards

The number of elements in the ArrayList

list.size() — for ArrayLists use .size() with parentheses

19
New cards

Get the element at index i

arr[i] for arrays, list.get(i) for ArrayLists

20
New cards

Set / update the element at index i

arr[i] = value; for arrays, list.set(i, value); for ArrayLists

21
New cards

Add an element to the ArrayList

list.add(value); adds to end — list.add(i, value); inserts at index

22
New cards

Remove an element from the ArrayList

list.remove(i); — removes by index, remaining elements shift left

23
New cards

Check if the ArrayList contains a value

list.contains(value) — returns true/false, works on objects not primitives

24
New cards

Create a new ArrayList

ArrayList list = new ArrayList<>(); — don't forget the import

25
New cards

The last index / last element

arr.length - 1 for arrays, list.size() - 1 for ArrayLists — always subtract 1

26
New cards

2D array — row i, column j

grid[i][j] — first bracket is row, second is column

27
New cards

Number of rows/columns in a 2D array

grid.length for rows, grid[0].length for columns

28
New cards

The length of the string

str.length() — strings use .length() with parentheses, unlike arrays

29
New cards

Get the character at index i

str.charAt(i) — returns a char, index starts at 0

30
New cards

Get a portion of the string

str.substring(start, end) — includes start, excludes end

31
New cards

Check if string contains a value

str.contains("x") OR str.indexOf("x") >= 0 — indexOf returns -1 if not found

32
New cards

Compare two strings for equality

str1.equals(str2) — NEVER use == for Strings, it checks reference not content

33
New cards

Convert to upper/lowercase

str.toUpperCase() / str.toLowerCase() — returns a new String, Strings are immutable

34
New cards

The index where [x] first appears

str.indexOf("x") — returns -1 if not found, always check before using

35
New cards

Write a class with instance variables

public class Name { private Type var; } — instance variables should almost always be private

36
New cards

Write a constructor

public ClassName(Type param) { this.var = param; } — constructor name must match class name exactly

37
New cards

Write a getter method

public Type getVar() { return var; } — getters provide read access to private fields

38
New cards

Write a setter / update method

public void setVar(Type val) { this.var = val; } — void means no return value

39
New cards

Call a method on an object

object.methodName(args) — you need a reference to the object

40
New cards

Use a helper method provided

Just call it — don't reimplement it. int result = helperMethod(arg);

41
New cards

Assume [method] works correctly

Call it and trust the return value — never rewrite it

42
New cards

Returns the [value] / return the result

return value; — every non-void method must have a return statement

43
New cards

Returns true if [condition], false otherwise

return condition; — you can return a boolean expression directly

44
New cards

Returns the total / sum

int total = 0; // loop adding to total; return total; — accumulate then return after loop

45
New cards

Returns the number of [items] that…

int count = 0; // loop counting; return count; — same pattern, count in loop, return after

46
New cards

void method — does not return a value

public void methodName() { } — void methods perform an action but return nothing

47
New cards

Returns a new list/collection

ArrayList result = new ArrayList<>(); // build it; return result;