Unit 1 (Using Objects and Methods)
Unit 2 (Selection and Iteration)
Unit 3 (Class Creation)
Unit 4 (Data Collections)
Mystery
100

Keyword used to identify that a method has no return type

Void

100

The keyword ___ is used to skip the rest of the code in an iteration and start the next iteration, and the keyword ___ is used to exit the loop altogether. 

What is continue and break?

100

In a class, attributes are typically ___ and methods are typically ___. 

What is private and public?

100

The main advantage of using ArrayLists over arrays. 

What is being able to change the size of the ArrayList/ArrayList is more flexible?

100

Term that refers to a program being able to perform its tasks as expected under stated conditions without failure.

What is system reliability?

200

Statement that returns a random number in between 45 and 68. (Use AP CSA way of generating random numbers)

(int)(Math.random() * 24)+45?

200

Below is an example (be specific):

int[] numbers = {10, 20, 30, 40, 50};
for (int number : numbers) {
       System.out.println(number);
}

What is an enhanced for loop?

200

The purpose of a Constructor in a Java class

To initialize the instance variables of a new object

200

The error in the code below (assume libraries are imported as necessary):

ArrayList<int> heights = new ArrayList<>();

heights.add(4);

heights.add(2);

heights.add(3);

System.out.println(heights.get(1));

What is creating an ArrayList with primitive variables?

200

This is a term used to describe code written by others that you do not need permission to use  .

What is open source?

300

Term referring to how converting a double to an integer always rounds down (i.e. removes anything past the decimal point). 

What is truncating/flooring?

300

Line of code that creates a new string called sub from a string str, including the first two characters out of the last three characters of str (i.e. if str = "elephant", sub = "an").

What is String sub = str.substring(str.length() - 3. str.length()-1);?

300

The name of a method you can include in your class in order to return a pre-defined string when an instance of the class is directly printed

What is toString?

300

Given int[][] grid = new int[3][5];, what is the value of grid.length[0] and grid.length?

grid.length = 3 (rows); grid[0].length = 5 (cols)

300

Term that refers to the Java behavior where if the first conditional for && is false, the second one isn't evaluated (same with ||, if the first conditional is true the second isn't evaluated). 

What is short circuit evaluation?

400

What does this print?  

System.out.print(3+5.0/2"Test"+13/2*6);

5.5Test36

400

Name of an error that is thrown when you try to access an element of an array that doesn't exist (i.e. array[array.length]). 

What is IndexOutOfBoundsException?

400

If a method in the Book class is defined as public void setPages(int pages), what is the keyword used to distinguish the instance variable from the parameter?

this (e.g., this.pages = pages;)

400

Write a line of code to initialize a 2D array of Strings named seatingChart with 4 rows and 6 columns.

String[][] seatingChart = new String[4][6];

400

The MCQ portion of the AP CSA test makes up ___% of your grade and the FRQ portion of the AP CSA test makes up ___% of your grade. 

What is 55 and 45?

500

The mandatory entry point for any standalone Java application, acting as the starting method the Java Virtual Machine 

public static void main(String[] args)

500

Allows you to add certain characters to a string, such as \n for new line or \' for '. 

What is an escape sequence?

500

Write a signature for a getter method for a private double price variable.

public double getPrice()

500

Names of both searching algorithms and names of all three sorting algorithms. 

What are linear search, binary search, selection sort, insertion sort, and merge sort? (Will also count bubble sort). 

500

This number written down in a base 10 system: 110110

What is 54?

M
e
n
u