Int, double, boolean, char are all ___ and String, Integer, Double are all ___.
What is primitive and non-primitive (reference)?
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?
In a class, attributes are typically ___ and methods are typically ___.
What is private and public?
The main advantage of using ArrayLists over arrays.
What is being able to change the size of the ArrayList/ArrayList is more flexible?
Symbol used to denote a comment in Java.
What is // or /* */?
Statement that returns a random number in between 45 and 68. (Use AP CSA way of generating random numbers)
What is 45 + (int)(Math.random() * 24)?
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?
___ refers to the attributes/methods belonging to the class itself, and ___ refers to the attributes/methods belonging to an instance of the class.
What is static and non-static?
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?
The order of the topics related to each of the four questions on the FRQ portion of the AP CSA exam.
What is Methods/Control Structures, Class Design, Array/ArrayLists, and 2D Arrays?
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?
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);?
What is toString?
A sorting method that moves an unsorted element into the correct spot in a sorted portion of the array repeatedly until the array is sorted.
What is insertion sort?
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?
Name of an error that is thrown when you try to divide a number by 0.
What is ArithmeticException?
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?
Term referring to when a subclass provides its own implementation for a method present in the superclass. Sometimes written @____ before the method itself.
What is override?
Name of the only sorting method we covered that uses recursion.
What is merge sort?
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?
Keyword that is put in front of variable name to mark that variable as immutable (cannot change the variable's value once it is assigned).
Ex: ___ int My_VAR = 4;
What is final?
Allows you to add certain characters to a string, such as \n for new line or \' for '.
What is an escape sequence?
This is something not inherited by the child class from the parent class.
What are private attributes/methods?
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).
Number of multiple choice exam questions on the AP CSA exam and how long you have to complete them.
What is 42 questions in 1 hour 30 minutes?