Array Lists
Syntax
Methods
Objects
Arrays
100

This method tells you how many elements are in an Array List.

What is .size() ?

100

The syntax of a for-each loop.

for (<array type> <element> : <array>) 

{     

<statements using var>; 

}

100

We provide a name for the method, a parameter
variable for each argument, and a type for its result here.

What is declaring a method?

100

Every one of these has its own set of data, and methods to manipulate the data.

What is an object?

100

This will always be 1 larger than the last address of the array. (ex: array[5], this will be 6)

the length of the array, array.length

200

Common ArrayList tasks, such as inserting and removing elements, are performed this way.

What is using methods from the ArrayList class?

200

This points variables to their corresponding data. 

What is a pointer?

200

The return type (keyword) for methods where there is no return.

What is void?

200

An object has both ____ and ________.

What are state and behavior?

200
This will run through as many times as an array is long.

What is a for-each loop?

300

To declare an Array List, this is used (fill in the blank):

ArrayList<String> names = new ___________________;

What is 

ArrayList<String>()

?

300

The syntax for accessing a specific element in a 2D array.

Array[row][column]

300

If we have a conditional in a method with one if, two else if's, and one else, we need this many return statements.

What is 4 return statements? (One for each possible condition)

300

This is used to initialize the state of an object when it is created.

What is a constructor?

300

An array of arrays that has columns and rows.

What is a 2D array?

400

Array Lists only can contain objects. Thus, you must use this type of class when initializing an Array List.

What is a wrapper class?

(i.e. Double, Boolean, Integer)

400

The syntax for creating a method.

<access modifier> <return type> <method name> ( <parameters> ){


}

400

A method that operates on an object's instance variables is called a(n) ________ ______.

What is an instance method?

400

A private instance variable of an object can be accessed here and only here.

What is only by methods of its class?

400

An array that can change the number of possible elements within.

What is an array-list?

500

These are the two criteria for when to use an Array instead of an Array List.

What are
1. When the number of elements will never change

2. When you're using a large collection of primitive types

?

500

The syntax to encapsulate class variables.

private type variablename = ...;

500

This type of method is one method used for ALL instances of that type of object for the class.

What is a static method?

500

Many classes have ________ and _______ methods. These terms describe what the method does.

What are accessor and mutator? (What are getter and setter? also acceptable)

500

Initializing an Array to equal another Array is not a "true" copy of the Array. 

A true copy of an Array is achieved by doing this.

What is using the Arrays.copyOf() method?