& Objs 1
The three Primitive data types we use in AP CS A.
What are int, double, and boolean?
They mean logical AND and OR
What are && and || ?
It is the part of a class between the instance variables and the methods.
What is a constructor?
add()
How do you add an element to an ArrayList?
These are the 2 things you must have in a Recursive algorithm
Base Case and a Recursive call to the same method.
It adds with numbers, but concatenates with Strings.
What is the + symbol?
You use it to compare Objects, like Strings, to each other.
What is .equals()?
Instance Variables, Constructors, Methods
What are the 3 basic parts of a Class?
Row then Column
2D arrays are in what sort dimensional order?
Consider the following code segment.
String str1 = "LMNOP";
String str2 = str1.substring(3);
str2 += str1.substring(2, 3);
What is the value of str2 after executing this code segment?
OPN
min, max, sqrt, abs, rand, and others.
What are some of the Math methods?
It is the first line of a method, with the method name and list of parameters. But, not the return type.
What is the method signature?
This is if you try to access an Array element that doesn't exist.
What is an out of bounds error?
arr[0] would be the first one
How would you get the first Row of a 2D array?
Consider the following code segment.
int x = ((int) (Math.random() * 10)) + 5;
int y = ((int) (Math.random() * 5)) + 10;
System.out.println(x + y);
What is the max and min values that could be printed?
What is 15 and 28?
When we give a variable a name and type. (And set aside memory to store the variable value).
What is Declare or Declaration?
It is how you "carry" a NOT (!) through a compound Boolean expression !( A && B) = !A || !B
What is DeMorgan's Law?
You use this if you don't want to make an actual Object, but want to be able to run Methods from a Class.
What is static?
Linear Search
What is when you start at one end of an array (or arraylist) and check each element in turn.

What is 15 times?
It gives us part of a String.
What is .substring()?
They are the Object versions of primitives.
What are Integer and Double?
It is when you make the variables or fields Private, but the methods Public
What is Encapsulation?
Binary Search
With an ordered (sorted) array, you can pick the center and halve, making a search faster.

What is the result of mystery(1234)
What is 43211234?