Loops
Classes
Arrays
Inheritance
Misc.
100

What are the three types of loops?

For

While

Do-while

100

In object oriented programming, what is a class?

A category/ blueprint for creating objects

100

int[] num = {4, 5, 8, 2, 7};

What is the value at num[1] ?

5


100

What keyword is used for the instance variables of a parent class?

protected

100

What is the name of the import we need when formatting currency?

NumberFormat

200

What is it called when you put one loop inside of another?

Nested loops

200

In object oriented programming, what is an object?

A specific entity or example of a class

  

200

Declare an array of doubles called grades with 5 rows and 4 columns.

double[] grades = new double[5][4];

200

What is another word for a "child" class?

A subclass
200

What are the three legal characters you can start a variable with?

letter
$ (dollar sign)

_ (underscore)

300

What type of loop do you use when you know how many times you would like to iterate?

For loop

300

True or False
A class can have only one constructor

False

300

boolean[][] answers = new boolean[10][2];

What is the index of the element in the last row and last column of the answers array?

answers[9][1]

300

What keyword is used in inheritance?

Extends

300

What is the purpose of selection sort?

Selection sort puts the elements of an array in order from least to greatest.

400

How many iterations will occur?

7

400

What is another name for getters and setters?

Accessors and mutators

400

What type of loop is used to fill a two dimensional array?

Nested for loops

400

Which of the following will be inherited by a subclass?

public instance variables
protected instance variables
private instance variables

public instance variables
protected instance variables

400

What is the relationship between the length and index of an array?

Length starts at 1, index starts at 0

500

How many iterations will occur?

012i

012i

012i

500

When you declare an instance variable as private, ____ has access to the variable.

Only the class itself

500

int[] num = {4, 5, 8, 2, 7};

What would this method call return?

indexOf(num, 1);

-1

500

The word _____ is used when calling the constructor of the parent class.

super

500

Put the following Strings in lexicographic order:

Banana

apple

123orange

banana

APPle

Apple

orange


123orange

APPle

Apple

Banana

apple

banana

orange

600

What are the three parts of a for loop?

for(??? ; ??? ; ???)

Starting point, end condition and increment.

600

What type of variable belongs to the entire class and not each object?

A static variable

600

True or False

A two dimensional array can have rows of different lengths?

True
600

What does it mean when a class is abstract?

You can't instantiate objects from an abstract class

600

What is as logical error?

When the output of the code doesn't match what the programmer expects

M
e
n
u