Java syntax requires most statements to end with what symbol?
What is a semicolon? (;)
What is the purpose of a constructor in a Java class?
What is to initialize objects of that class?
What is the index of the last element in an array of size n?
What is n-1?
What logical operator is used to test if two conditions are both true in Java?
What is && (AND)?
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];?
What does the method list.size() return for an ArrayList?
What is the number of elements in the ArrayList?
In object-oriented programming, what do we call the blueprint that defines the structure and behaviors (methods) of objects?What is a class?
What is a class?
In the following code snippet, what will the getName() method return?
What is the name of the student passed to the constructor?
How do you declare an array of integers in Java with a length of 5?
What is int[] arr = new int[5];?
Which Java keyword is used to create a block of code that will execute if a condition is true?
What is if?
What is the name for traversing a two dimensional array "column by column" instead of "row by row"?
What is column-major order?
What method would you use to add an element to an ArrayList?
What is add()?
What keyword is used to create a new instance of a class in Java?
What is new?
What is the name of the first line of the constructor which includes the public keyword, the constructor name, and the values to specify when an object is created?
What is the constructor signature?
What is the default value of an integer element in a newly created array of integers in Java?
What is 0?
This notation is used to check if two values are NOT equal
What is != ?
How do you access the element in the second row and third column of a 2D array arr?
What is arr[1][2]?
How do you declare an ArrayList of Strings in Java?
What is ArrayList<String> list = new ArrayList<>();?
Which principle of OOP allows a subclass to inherit fields and methods from a superclass?
What is inheritance?
In Java, what is the difference between public and private access modifiers?
What is public allows access from anywhere, while private restricts access to within the same class?
How would you access the third element in a 1D array called arr?
What is arr[2]?
If you use the == comparison operator on two objects,what is being compared?
What are the locations in memory of the two objects?
Given the following 2D array, write a loop to print each element:
int[][] matrix = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
How do you remove the element at index 3 in an ArrayList called list?
What is list.remove(3)?
What is the term for a method in a subclass that overrides a method in its superclass?
What is method overriding?
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 type of loop is best used when you will need to traverse every element in an array
What is an enhanced for loop?
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)?
The output of arr.length, where "arr" is a 2D array with 4 rows and 5 columns
What is 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);