Stop _______ me!
boolean
A ___ error is when your program compiles and runs, but doesn't behave the way you intend
Logic
This returns a String representation of an object
toString()
What class contains functions that allow you to perform trig in Java
Math
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"
This keyword is used to make a class be a subclass of another class
extends
What function must you implement in order to implement the Comparable interface, and what does that function return?
compareTo(), int
The function that is automatically called when a program is run
main()
Write the line of code that will return "Part" using:
String s = "Partial";
s.substring(0, 4);
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
Use this type of structure when you know the number of iterations
for
Instance data should typically be declared as ____
private
You should compare reference types using this function
equals()
What do we call the set of classes that allow us to treat a primitive value like a reference type?
Wrapper classes
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
Use this keyword when you need to use a class from a Java package other than java.lang
import
A recursive method must have a _____
Base case
This function returns a positive integer, a negative integer, or zero
compareTo()
This class is a superclass of all classes in Java
Object
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"
Nice ____, but I am going to _____ up with you
try; catch
A non-abstract subclass of an abstract class must ______
Implement all abstract methods in the superclass
What is the major difference between arrays and ArrayLists?
ArrayLists can grow/shrink as needed
Describe the return value of:
"have".compareTo("doesn't have");
a positive integer
The HAS-A relationship refers to what relationship between classes?
Composition