Java Beans
Name That Algorithm!
Java Talk
Get Some Arrays
Base to Base
100

This method is required in all Java programs: public static void ______ (String[] args) { ... }

What is main?

100
This search method involves looking at the middle of a sorted list, then narrowing down where to look by halves
What is binary search?
100

"c" is an example of this data type

What is String?

100

This method is used to access the length of an Arraylist

What is list.size()?

100

012 in Base 10

What is 110?

200
if (5 * 7 < 4 * 9) return true; else return false;
What is true?
200

This search involves looking at each value in order

What is sequential search?

200

use this visibility keyword to protect your data fields

What is private?

200

The boolean add(E obj) method does...

What is this adds the object to the end of a list and returns true if the object is of the correct type?

200

256 to Base 10

What is 1710?

300

this prints out something to the console

What is System.out.println (or System.out.print)?

300

This method splits the array values into halves recursively until each half has one element, and then combines values in the halves (in order) to sort the list.

What is merge sort?

300

The main method always returns

What is void?

300

To access the length of an array, no arguments are needed

What is the length of an array is considered to be a field or attribute?

300

213 to Base 4

What is 134?

400
the length of the string of “computer science is cool”
What is 24?
400

The maximum number of iterations required to find an element in an ordered array of size 500 with binary search

What is 9?

400

b in the following code

boolean[] b = new boolean[3];

What is an boolean array of size 3?

400

name 2 differences between an array and array list

What are ArrayLists are resizable, can only accept objects (not primitives), and use the .size() method instead of .length field?

400

The shortcut for converting from Base 2 to Base 8

What is grouping by threes and converting each group into a Base 8 digit (0-7)?

500

Name at least 3 primitive data types

What is short/int/long/float/double/boolean?

500

If there are N data values in a list, for how many iterations will a binary search run?

What is log2N?

500

a function calls itself

What is recursion?

500

Declare an Arraylist of Integers that is an instance variable, assume the College Board standard for visibility applies

What is...

private ArrayList<Integer> nums = new ArrayList<Integer>(); OR

private ArrayList<Integer> nums = new ArrayList<>();?

500

101000102 in Base 8

What is 2428?