Method in the Madness
These are a few of my favorite Strings
It's Syntax Time
I Fear No Math
My Brain is a Compiler
100
This String method can be used to establish lexicographic order.
What is "compareTo"?
100
The output from String fruit = "banana"; char letter = fruit.charAt(1); System.out.println(letter)
What is 'a'?
100
Combining simple statements and expressions into complex computations
What is composition?
100
The value of a:

    double a = 1 / 2;
What is zero?
100
The value of:

        Math.random();
What is a double between 0.0 and 1.0?
200
The value of sqrt(4):

public static void sqrt(x) {
double s = Math.sqrt(x);
return;
}

sqrt(4);
What is does nothing! sqrt doesn't return a value.
200
The output of: int i = 0; String s = “computer” while (i < 4) { System.out.print(s.charAt(i)); i++; }
What is "comp"?
200
A run-time error in Java is called this
What is an exception?
200
The value of:

        double a = -4 + 42 / (7 * 3)
What is 2?
200
The compiler says what?

        public static void square(double int) {
          System.out.println(int * int);
        }

What is "won't compile. int is a keyword"?
300
The keyword that indicates a method has no return value
What is void?
300
The output of: String n = "Obi-Wan Kenobi" String s = n.substring(1, 3) + n.substring(8, 10); System.out.println(s);
What is "biKe"?
300
Name for the value you provide when you invoke a method
What is an argument?
300
7 % 3
What is 1?
300
The number of bug instances in this program:

    import info.gridworld.actor.Bug
    public class Bugz {
      Bug bug1 = new Bug();
      Bug bug2 = bug1;
      System.out.println("We got bugs!");
    }
What is one?
400
A special method used to instantiate an object
What is a constructor?
400
The output of: String city = "New York"; int length = city.length(); char last = city.charAt(length); System.out.println(last);
What is 'throws a StringIndexOutOfBoundsException'?
400
The keyword used to indicate a method belongs to a class and not an object
What is static?
400
The value of the binary number in decimal:

        0 0 1 1  0 0 1 0
What is 50?
400
The number of bugs in this program:

        public class PayRate {

          public static void main(String[] args) {
            printPay(10)
          }

          public static void printPay(int hour, double rate) {
            System.out.println(hour * rate)
          }

        }
What is three? (Missing 2 semi-colons and printPay is called with only one argument)
500
public int award(int a, int b, int c) {
if (a == b && b == c) {
return 10;
}
else {
return 5;
}
}

System.out.println(award(10, 10, 3));
What is 5?
500
The output of: String fruit = "banana"; int index = fruit.indexOf('a'); System.out.println(index);
What is 1?
500
A block of statements that may or may be executed
What is a conditional?
500
The value of the following binary in hexadecimal:

        1 1 1 0  0 0 1 1
What is E3?
500
This program does what?

        public class Recurse {

          public static void main(String[] args) {
            recurse(3);
            System.out.println("finished");
          }

          public static void recurse(int n) {
            System.out.println(n);
            recurse(n - 1);
          }

        }
What is crashes? (Never terminates - it will print out a bunch of counting down from 3 then throw a java.lang.StackOverflowError. The number of numbers printed depends on the JVM’s memory settings)
M
e
n
u