What is an Array?
A list of elements with a fixed size and elements.
What is a For Loop?
A statement that iterates the block of code inside it for a set number of times.
What is another name for Non-primitve Data Types?
Reference data types.
What is a getter?
A method that can get the value of a variable in a different class.
What is an ArrayList?
A better version of the Array with more flexibility.
What is a For Each Loop? Also called an Enhanced For Loop.
For each loops will iterate through elements in arrays or collections making it easier to loop through these data structures without needing the indexes.
How many Primitive Data Types are in Java?
There are 8 Primitive Data Types
What is the skeleton code for a class?
public class {
public static void main(String[] args){
}
}
What is a setter?
A method that can set a variable's value in a different class.
What are the differences between Arrays and ArrayLists?
Arrays have a fixed size while ArrayLists don't. You can add elements to ArrayLists but you can't with Arrays after being declared.
What is a Nested For Loop?
A Loop statement inside another Loop statement. Can be used to get information about multidimension data structures such as 2D arrays and 3D arrays.
What are Primitive Data Types?
Predefined data types that specify the size and type of the data that can be stored. For example, a byte has a value range of -128 to 127 and nothing outside of that range. These data types are not objects.
If I create a class without a constructor and I try to create an object in my main class, what would happen? Would I get an runtime error, a syntax error, or no errors?
No errors; Java provides a default constructor when you create an object.
What are modifiers?
A keyword that in inserted in front of variables, methods, constructors, etc. that determines the accessibility of classes, methods, attributes, etc.
What is an example of a method related to ArrayLists?
listName.add("value");
listName.get(0);
listName.set(0,"newValue");
What is a While Loop?
A loop that will iterate forever until a condition is met, can be thought as a repeated if statement.
What is an example of a Non-primitive Data Type?
How many objects can you have in a class?
No limit as long as you have the memory for it.
What is Inheritance?
Inheritance is where a class is a child class (subclass) of the parent class (superclass). The subclass will inherit the attributes and methods of the parent class.
What data type are elements in ArrayLists?
What is a Do While Loop?
Similar to a While Loop but it will always do one iteration even if the condition is already met. This is due to the condition being checked after the iteration.
What is a difference between Primitive and Non-Primitive Data Types?
Primitive - Pre-defined Data Types
Non-Primitive - User-defined Data Types
What is Polymorphism?
Many versions of one method that is reused in different classes. Works with Inheritance for this to work.
What is an interface and what does it do?
A completely abstract class with only empty bodies for methods. This is used for security