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[] grades = {42, 75, 84, 92, 77};

What is the value at grades[1] ?

75

100

What keyword is used in inheritance?

extends

100

What is a logical error?

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

200

What are the three parts of a for loop?

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

Starting point, end condition and increment.

200

In object oriented programming, what is an object?

A specific instance of a class

200

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

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

200

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

protected

200

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

NumberFormat

300

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

For loop

300

What do we call a behavior that can be performed on an object?

A method

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 is another word for a "child" class?

A subclass

300

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

letter
$ (dollar sign)

_ (underscore)

400

How many iterations?

7

400

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

Only the class itself

400

A two dimensional array can have rows of different lengths?

True

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 purpose of selection sort?

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

500

Predict the output

1 2 3 4

500

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

A static variable

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