Java syntax requires most statements to end with this symbol
What is a semicolon? (;)
What does the method list.size() return for an ArrayList?
What is the number of elements in the ArrayList?
What method would you use to add an element to an ArrayList?
What is add()?
This keyword is used to define a method that cannot be accessed outside of its class in Java
What is 'private'?
What logical operator is used to test if two conditions are both true in Java?
What is && (AND)?
What is the purpose of a constructor in a Java class?
What is to initialize objects of that class?
If you use the == comparison operator on two objects,what is being compared?
What are the locations in memory of the two objects?
This notation is used to check if two values are NOT equal
What is != ?
A process in which the evaluation of a logical expression exits when the result is clear, even before the complete evaluation of the expression
What is short-circuited evaluation?
What is the index of the last element in an array of size n?
What is n-1?
In the following code snippet, what will the getName() method return?
What is the name of the student passed to the constructor?
What keyword is used to make sure a method in a superclass CANNOT be overridden in a subclass?
What is 'final'?
How do you declare an ArrayList of Strings in Java?
What is ArrayList<String> list = new ArrayList<>();?
The keyword used to call the superclass constructor from a subclass
What is super()?
The range used to generate a number with Math.random() in Java
What is '[0,1)'?
(0 inclusive, 1 exclusive)
0 <= num < 1
What is the purpose of the 'this' keyword in a constructor?
What is to refer to the current object's instance variable (i.e., differentiating instance variables from parameters)?
This sorting algorithm is most efficient on a nearly sorted array.
What is insertion sort?
How can you retrieve only the third character of a string called myString? (assume myString is at least four characters long)
What is myString.substring(2, 3);
This sorting algorithm finds the smallest element in an unsorted array and places it at the beginning of the array in each iteration.
What is selection sort?
A set of logical laws used to demonstrate the equivalence of two Boolean expressions
What are 'De Morgan's Laws'?
How do you declare a two-dimensional array of integers with 3 rows and 4 columns in Java?
What is int[][] arr = new int[3][4];?
How can you retrieve only the third character of a string called myString? (assume myString is at least four characters long)
What is myString.substring(2, 3);
Write a recursive method to compute the factorial of a number n (i.e., n! = n * (n-1) * ... * 1).
How would you write a condition to check if a variable x is greater than 5 and less than 10 in a single statement?
What is 'if (x > 5 && x < 10)'?
This is an object-oriented programming concept where the instance variables of a class are hidden from other classes and can be accessed only through the methods of the class
What is 'Encapsulation'?