Math and Random
Shorthand Operators
Java Basics
String Methods
Control Structures
100
A line of code that will return the absolute value of the variable x.
What is Math.abs(x);
100
The shorthand for x = x + y;
What is x += y;
100
A programmer defined data type
What is a class?
100
The method that returns the length of the following string:
String message = "Hello!";
What is message.length();
100
A line of code that will print the sum of x and y, only if x is less than 10.
What is
if(x<10)
System.out.print(x+y);
200
A line of code that will take the square root of a variable x.
What is Math.sqrt(x);
200
The shorthand for x = x * y;
What is x *= y;
200
An instance of a class.
What is an object?
200
We use this acronym to remember how Java sorts strings:
What is SNUL

Symbols
Numbers
Uppercase Letters
Lowercase Letters

200
The type of loop that allows the end user to decide how many iterations there will be.
What is a sentinel controlled loop?
300
A line of code that will return a variable x, cubed.
What is Math.pow(x, 3);
300
The shorthand for x = x + 1;
What is x++;
300
What is the return type in the following method declaration?

public double calculateValue(int x, int y)

What is a double?
300
A line of code that tests whether the Strings message1 and message2 are the same.
What is message1.equals(message2);
300
The syntax to execute a segment of code exactly 10 times.
What is for(int i = 0; i <10; i++)
400
A line of code that will assign a random number between [0, 1) to x.
What is double x = Math.random();

or

Random generator = new Random();
generator.nextDouble();

400
The shorthand for x = x - 1;
What is x--;
400
By convention, class names always start with this.
What is a capital letter.
400
A line of code that will search for the first "i" in the following String:
String message = "This class is fun!";
What is message.indexOf("i");
400
The command to exit out of the immediate control structure.
What is break;
500
Describe the range of values that could possibly be assigned to someDigits in the following line of code:

Random generator = new Random();
int someDigits = generator.nextInt(100) + 1;

What is 1-100
500
String greeting = "Hello, "
String greeting = greeting + "World!"
What is greeting += "World!"
500
Single line comments begin with these.
What is //
500
The line of code that will return "class" from the following String:
String message = "This class is fun!"
What is message.substring(5,10);
500
A line of code that will execute a command until a boolean condition evaluates to false.
What is while(condition)