This is the special method that is used to create an object.
What is a constructor?
This type of logic is named for a 19th century mathematician.
What is boolean logic?
In order to bring a value back to where your method was called, include this keyword, which also ends your method's execution.
What is return?
"New York City".length()
What is 13?
This operator divides two numbers and returns their remainder, not their quotient.
What is modulus?
Classes define these two programming constructs: one can be described as the properties of an object, the other, its actions.
What are instance variables and methods?
It's the truth table for the following expression:
A || !A
What is "all values are true"?
Its the return type when you don't want to return anything.
What is void?
"Columbia Prep".charAt(9);
What is P?
When looping over a string, be careful not to go too far - or you'll get this error.
What is an "ArrayOutOfBoundsException"?
For the following class, it's the code that will set the instance variable equal to the constructor parameter:
public class Soda {
int gramsSugar;
public Soda(int g) { ... }
}
What is gramsSugar = g;?
It's the final value of grade when score = 90.
if (score >= 60) grade = "D";
if (score >= 70) grade = "C";
if (score >= 80) grade = "B";
if (score >= 90) grade = "A";
else grade = "E";
What is "DCBA"?
What is the method header for a method that takes two integers and returns true or false based on whether those numbers are true?
What is
public boolean check (int x, int y)
"AP CS A".indexOf("APCS");
What is -1?
What is compiling?
It's the error seen here:
String newWord = String("Foobar");
What is a missing "new" keyword?
De Morgan's law states it is equivalent to this boolean expression:
!(A || B)
What is !A && !B?
When printing an object, the Java compiler automatically calls this special method to determine what to print.
What is toString()?
"Donald Trump".substring(9);
This company develops and owns the rights to the Java programming language.
It's the two aspects of a constructor's method header that make it unique from other functions.
What are "no return type" and "same name as class"?
Put these operators in the correct order of precedence:
=
()
||
&&
What is
()
&&
||
=
If we have two methods/constructors that share a name, the Java compiler looks at these two aspects of the method header to see which version to call.
What are the number of parameters and their data types?
String s = "Joe Biden";
s.substring(s.indexOf("i"), s.length() - 2);
What is "id"?
The process of creating an object is also known as this five-syllable phrase.
What is instantiation?