I
II
III
IV
V
100

813 % 100 / 3 + 2.4

6.4

100

2 * 3 / 4 * 2 / 4.0 + 4.5 - 1

4.0

100

89 % 10 / 4 * 2.0 / 5 + (1.5 + 1.0 / 2) * 2

4.8

100

How many students are in our class?

25

100

What do all java programs need in order to run?

Class + main method

200

Declare an array called 'seniors' that is the size of the number of Seniors in our class

 int[] seniors = new int[7];

200

What does OOP stand for?

Object Oriented Programming

200

Data __________ is a technique in which the implementation details of a class are kept hidden from the user

encapsulation

200

String patrick = "Patrick";

Write an expression that prints if the number of letters in patrick is even or odd. 

        if (patrick.length() % 2 == 0 ) {

            System.out.println("even");

        } else {

            System.out.println("odd");

        }

200

Static methods are associated with the class, not _________ of the class

objects

300

what method returns the number of elements in an arraylist?

int size()

300

Declare an array called 'sophomores' that is the size of the number of Sophomores in our class

int[] sophomores = new int[5];

300

Declare an array called 'juniors' that is the size of the number of Juniors in our class

int[] juniors = new int[13];

300

8 + 6 * -2 + 4 + "0" + (2 + 5)

007

300

2 + "(Ryan) 2.0" + 2 * 2 + 2

2(Ryan) 2.042

400

Create an array in a single line of code called 'names' that contains all of the students in our class with first names that begin with the letter 'A'

String[] names = {"Aki", "Allison", "Andy"};

400

Create an array in a single line of code called 'names' that contains all of the students in our class with last names that begin with the letter 'L'

String[] names = {"Sam", "Charlie", "Sebastian","Simon"};

400

Comments are ignored by the __________ and are not executed when the program is run

comments

400

Create an array in a single line of code called 'names' that contains all of the students in our class with first names that have repeating letters in it. 

Ex: "Peter" has 2 e's

String[] names = {"Allison", "David", "Sally","Will","Sebastian","Connor","Hanna","Daniela"};

400

What class do all java classes inherit from?

Object class

500

Consider the following method.

public static int calcMethod(int num) { 

       if (num == 0) {

             return 10;

       }

        return num + calcMethod(num / 2);

}

What value is returned by the method call calcMethod(10) ?

 28

500

What is Ms. Pletcher's middle name? hint: ggnlnthii

Lightning

500

Apply De Morgan's law to this:

!(A && B)

!A || !B

500

 System.out.println("Patrick Bowers".substring(4,10));

ick Bo

500

What is Patrick's middle name? hint: ohsamt 





Thomas


M
e
n
u