String Manipulation
Crazy Cool Cumulative Algorithms
GridWorld
Doggies
Scanners
100
What the following code prints:
  String s = "jeopardy";
  System.out.println(s.substring(3));
What is "pardy"?
100
What we call it when we combine multiple strings into a single one using the + sign.
What is concatenation?
100
What the Rock's act() method does.
What is nothing?
100
The keyword you use in your code to let a child class re-use behaviors from a parent
What is extends?
100
This is what we've generally used a Scanner for in AP CS.
What is reading user input?
200
What the following code prints:
String s = "ADBECFG";
System.out.println(s.charAt(3) - s.charAt(5));
What is "-1"?
200
The value of x after executing this code:
int x = 2;
for (int i = 0; i < 15; i++)
  x += 10;
What is 152?
200
The GridWorld actor that remains in one place on the grid and darkens over time.
What is Flower?
200
The strange CS word for overriding a method differently in subclasses of a parent class.
What is polymorphism?
200
The Scanner method that checks to see if the user has typed another String.
What is hasNext()?
300
The result of calling indexOf("A") on the string "a erg aAbcd fg or Aab"
What is 7?
300
The value of x after executing this code:
int x = 5;
for (int i = 5; i < 10; i += 2)
  x += 2;
What is 11?
300
The four subclasses of Actor that are part of the basic GridWorld framework.
What are Bug, Rock, Flower, and Critter?
300
The term you use in a child class to explicitly reference a method from the parent class.
What is super?
300
The syntax for creating a Scanner object called s that will read user input from the console.
What is Scanner s = new Scanner(System.in)?
400
After this code is executed, it's what we know about test.
int test = "Hen".compareTo("fox");
What is that it is less than zero?
400
What the following code will print out:
String a = "APCS";
for (int i = 0; i < a.length(); i++)
  System.out.print(a.substring(i));
What is "APCS"?
400
The Critter subclass that turns randomly left or right if it can't move sideways.
What is CrabCritter?
400
This kind of method cannot have a body (a.k.a. an implementation) in the class where it is first declared.
What is an abstract method?
400
Something besides System.in that can be passed to the Scanner constructor to create a new Scanner object.
What is a File OR a String? (either answer is ok)
500
It's possible to construct a new String from an array of these, like this:
String hello = new String(arrayOfSomething);
What are characters?
500
What this code will print, assuming names has been correctly initialized to contain "Harold", "Kumar", and "Buckington Fullersworth III".
int g = 0;
for (int h = 1; h < names.length; h++)
  if (names[h].length() > names[g].length())
    g = h;
System.out.println(names[g]);
What is "Buckington Fullersworth III"?
500
A Critter could overwrite either one of these two methods to only eat Flowers in front of it.
What are getActors() and processActors()?
500
The signature in a method of a subclass of Dog that overrides this Dog method:
public abstract String speak();
What is public String speak()?
500
This is what happens if you forget to close a Scanner.
What is a resource leak?
M
e
n
u