Arithmetic
Logic
Random Java
Arrays
Strings
100

10/4

2

100

Let x = true, y = true

Evaluate the expression

(x || !y) &&(!x || y)

true

100

A class that converts primitive data types into objects.

A Wrapper Class

100

Type out the correct statement that will initialize an array of Strings called "words" with four empty strings.

String [] words = {" ", " ", " ", " "};


100

"catastrophe".substring(4);

"strophe"
200

10/4.0

2.5

200

Let x = true, y = true

Evaluate the expression

(x || !(x && y)) || (x && y)

true

200

Changing a variable from one type to another

Type Casting

200

What is the result of the following code

ArrayList<String> laundry = new ArrayList<String>();

laundry.add("shirt");
laundry.add("sock");
laundry.add("sock");
laundry.add("sweater");
laundry.add("shorts");
laundry.remove(1);

System.out.print(laundry)

[shirt, sock, sweater, shorts]
200

"catastrophe".substring(4,5);

"s"
300

11 / 2 * 3

15

300

Let x be an integer. For what range of x is the expression true?

!(x > 5) && (x > 0)

0 < x <= 5

300

A sorting algorithm in which each value is placed in its final sorting position

Selection Sort

300

An array of int values called arr was initialized with elements {3, 1, 7, 3, 0} After 3 iterations of the selection sort, what is the status of the array?

{0, 1, 3, 7, 3}

300

"catastrophe".indexOf("a")

1

400

(int) (10.01 / 4.99)

2

400

Daily double!








What does the following evaluate to?

!(x || y) == ((!x) & (!y))

true

400

The method that creates an instance of a class.

Constructor

400

An array of String objects is created and initialized as {"Nobody", "Time", "Element", "Cow", "Apple"}. After two iterations of the insertion sort, what is the state of the array?

{"Element", "Nobody", "Time", "Cow", "Apple"}

400

Daily Double!











"catastrophe".substring(0);

"catastrophe"

500

(double) (10/4)

2.0

500

Let x = false, y = true, and w be unknown. Evaluate the following expression.

(w OR x) OR (y AND !w)

true

500

What is the syntax to create a multi-line comment in Java?

/*

*/

500

Suppose an array of type 'int' is to be sorted in decreasing order using the selection sort algorithm. If the array is originally {2, 8, 10, 6, 5, 13}, what will the array look like after 2 passes of the sorting loop?

{13, 10, 8, 6, 5, 2}

500

"catastrophe".substring(11);

IndexOutOfBoundsException

Click to zoom
M
e
n
u