Four primitive data types
What is int, char, boolean and double?
This feature reveals the location of an element in an array.
What is the index?
What type of loop runs for a set amount of iterations
What is a for loop?
An array that grows and shrinks as a program runs
What is an ArrayList?
The operator that connects the object variable to its method
What is the dot operator?
An abstract data type (ADT)
What is String?
The term used for data in an array.
What is an element?
Write a for loop that will run for 5 iterations
What is for(int i = 0; i < 5; i++){
}
A method to add new objects to an ArrayList
What is add()?
The reserve word in Java the creates an instance of an object
What is “new”?
This action will reveal the Unicode value of a letter or number
What is casting? String h = "Hello"; System.out.println((int)h.charAt(0)); // H = 72 in Unicode
All the elements of an array minus 1 or shown as n-1
What is the upper bound?
______(true){
}
is what type of loop?
what is while?
A method to return the number of elements in an ArrayList
What is size()?
Create an instance of a Dog class with name and age in the constructor
What is Dog d1 = new Dog(“Fido”, 6) ?
Create and assign value to a variable to store the value of pie (3.14)
What is double pie = 3.14;?
The standard definition of an array.
What is variable with multiple values and same data type?
for(int i = 3; i < 20; i+=2){
}
How many iterations does this loop have when run?
What is 9
Create an empty Arraylist army of Ship objects
What is ArrayList<Ship> army = new ArrayList<Ship>();
What data structure will store objects to an array?
What is an ArrayList?
The feature in Java that allows you to add the contents of a variable to regular text
What is concatenation?
Write the Java code to instantiate an empty array that will be used to store the name of Snow White’s 7 Dwarfs
What is String [] dwarfs = new String[7];
What loop continues while set conditions are not met, and checks after every iteration
What is Do-While?
Use a for loop to print out all elements in an ArrayList “orders” filled with Pizza() objects
for (Pizza p: orders){
System.out.println(p);
}
The method that makes what is encapsulated available to the client code
What is the constructor?