Data Types and Variables
Arrays
Loops
ArrayLists
OOP
100

Four primitive data types


What is int, char, boolean and double?

100

This feature reveals the location of an element in an array.


What is the index?

100

What type of loop runs for a set amount of iterations

What is a for loop?

100

An array that grows and shrinks as a program runs


What is an ArrayList?

100

The operator that connects the object variable to its method


What is the dot operator?

200

An abstract data type (ADT)


What is String?

200

The term used for data in an array.


What is an element?

200

Write a for loop that will run for 5 iterations

What is for(int i = 0; i < 5; i++){

}

200

A method to add new objects to an ArrayList


What is add()?

200

The reserve word in Java the creates an instance of an object


What is “new”?

300

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

300

All the elements of an array minus 1 or shown as n-1


What is the upper bound?

300

______(true){

}

is what type of loop?

what is while?

300

A method to return the number of elements in an ArrayList


What is size()?

300

Create an instance of a Dog class with name and age in the constructor


What is Dog d1 = new Dog(“Fido”, 6) ?

400

Create and assign value to a variable to store the value of pie (3.14)


What is double pie = 3.14;?

400

The standard definition of an array.


What is variable with multiple values and same data type?

400

for(int i = 3; i < 20; i+=2){

}

How many iterations does this loop have when run?

What is 9

400

Create an empty Arraylist army of Ship objects


What is ArrayList<Ship> army = new ArrayList<Ship>();

400

What data structure will store objects to an array?


What is an ArrayList?

500

The feature in Java that allows you to add the contents of a variable to regular text


What is concatenation?

500

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];

500

What loop continues while set conditions are not met, and checks after every iteration

What is Do-While?

500

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);

}

500

The method that makes what is encapsulated available to the client code


What is the constructor?

M
e
n
u