Algortihms & Compilers
Casting &
Overflow
Documentation & Signatures
Instantiation
Deep Dive
Advanced String Methods
100

This type of error occurs during execution and often causes the program to terminate abnormally.

What is a run-time error?

100

To convert the double 9.99 to an int using casting, this Java expression is written.

What is (int) 9.99, which produces 9?

100

The three types of comments in Java: block comment, single-line comment, and this special kind used for API documentation.

What is a Javadoc comment ( /** */ )?

100

When a constructor is overloaded, these differ between each version.

What are the parameter lists (signatures)?

100

For String s = "AP CSA", s.indexOf("CSA") returns this value.

What is 3?

200

An algorithm that processes steps one at a time in a defined order demonstrates this property.

What is sequencing?

200

This expression rounds the non-negative double x to the nearest integer using casting.

What is (int)(x + 0.5)?

200

A precondition tells programmers this about a method.

What is the condition that must be true before the method is called for it to work correctly?

200

After a constructor finishes executing, control returns to this location in the program.

What is the point immediately following where the constructor was called?

200

The return value of s.substring(from) when called with only one argument.

What is the substring from index from to the end of the string (equivalent to substring(from, length()))?

300

An exception is a specific kind of this error type, occurring when an unexpected situation is not caught by the compiler.

What is a run-time error (specifically an unchecked run-time error)?

300

The constant that holds the largest possible int value in Java.

What is Integer.MAX_VALUE?

300

A postcondition describes this about a method.

What is the guaranteed state or return value after the method executes?

300

A reference variable that has been declared but not assigned an object holds this value.

What is null?

300

This String method returns a negative number, zero, or a positive number when comparing two strings.

What is compareTo()?

400

This tool inside an IDE checks for syntax errors before a program is executed.

What is the compiler?

400

When a double is more precise than the memory allotment allows, this type of error occurs.

What is a round-off error?

400

When Java passes arguments to a method using call by value, this is what gets copied into the parameter.

What is the value (a copy) of the argument, not the original variable?

400

This essential knowledge statement explains why parameters allow constructors to be more flexible.

What is that parameters let constructors accept values to establish initial attribute values of the object?

400

When a primitive value is concatenated with a String using +, Java performs this implicit action.

What is automatic conversion of the primitive to its String representation?

500

A logic error differs from a syntax error in this key way regarding when it is detected.

What is that a logic error is detected by testing (at runtime), not by the compiler?

500

Why adding two large positive int values can produce a negative result in Java.

What is integer overflow — the result wraps around within the allowed int range?

500

A method signature consists of these two components.

What is the method name and the ordered list of parameter types?

500

The reason all Java classes are implicitly subclasses of Object.

What is that Java's class hierarchy places Object at the top, so every class inherits from it?

500

Concatenating a String with any object implicitly calls this method on the object.

What is toString()?

M
e
n
u