Java reserved words
Conceptual
Methods
Predefined Classes
OOP Concepts
100

Stop _______ me!

boolean

100

A ___ error is when your program compiles and runs, but doesn't behave the way you intend

Logic

100

This returns a String representation of an object

toString()

100

What class contains functions that allow you to perform trig in Java

Math

100

Given the following classes:

class A{

public void a(){System.out.print("A");}}

class B extends A {

public void a(){super.a(); System.out.print("B");}

public void b(){System.out.print("B");}}

What is the result of the following code in a client:

A obj = new A();

obj.a();

prints "A"

200

This keyword is used to make a class be a subclass of another class

extends

200

What function must you implement in order to implement the Comparable interface, and what does that function return?

compareTo(), int

200

The function that is automatically called when a program is run

main()

200

Write the line of code that will return "Part" using:

String s = "Partial";

s.substring(0, 4);

200

Given the following classes:

class A{

public void a(){System.out.print("A");}}

class B extends A {

public void a(){super.a(); System.out.print("B");}

public void b(){System.out.print("B");}}

What is the result of the following code in a client:

A obj = new B();

obj.b();

error

300

Use this type of structure when you know the number of iterations

for

300

Instance data should typically be declared as ____

private

300

You should compare reference types using this function

equals()

300

What do we call the set of classes that allow us to treat a primitive value like a reference type?

Wrapper classes

300

Given the following classes:

class A{

public void a(){System.out.print("A");}}

class B extends A {

public void a(){super.a(); System.out.print("B");}

public void b(){System.out.print("B");}}

What is the result of the following code in a client:

A obj = new A();

obj.b();

error

400

Use this keyword when you need to use a class from a Java package other than java.lang

import

400

A recursive method must have a _____

Base case

400

This function returns a positive integer, a negative integer, or zero

compareTo()

400

This class is a superclass of all classes in Java

Object

400

Given the following classes:

class A{

public void a(){System.out.print("A");}}

class B extends A{

public void a(){super.a(); System.out.print("B");}

public void b(){System.out.print("B");}}

What is the result of the following code in a client:

A obj = new B();

obj.a();

prints "AB"

500

Nice ____, but I am going to _____ up with you

try; catch

500

A non-abstract subclass of an abstract class must ______

Implement all abstract methods in the superclass

500

What is the major difference between arrays and ArrayLists?

ArrayLists can grow/shrink as needed

500

Describe the return value of:

"have".compareTo("doesn't have");

a positive integer

500

The HAS-A relationship refers to what relationship between classes?

Composition