This type of error occurs during execution and often causes the program to terminate abnormally.
What is a run-time error?
To convert the double 9.99 to an int using casting, this Java expression is written.
What is (int) 9.99, which produces 9?
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 ( /** */ )?
When a constructor is overloaded, these differ between each version.
What are the parameter lists (signatures)?
For String s = "AP CSA", s.indexOf("CSA") returns this value.
What is 3?
An algorithm that processes steps one at a time in a defined order demonstrates this property.
What is sequencing?
This expression rounds the non-negative double x to the nearest integer using casting.
What is (int)(x + 0.5)?
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?
After a constructor finishes executing, control returns to this location in the program.
What is the point immediately following where the constructor was called?
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()))?
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)?
The constant that holds the largest possible int value in Java.
What is Integer.MAX_VALUE?
A postcondition describes this about a method.
What is the guaranteed state or return value after the method executes?
A reference variable that has been declared but not assigned an object holds this value.
What is null?
This String method returns a negative number, zero, or a positive number when comparing two strings.
What is compareTo()?
This tool inside an IDE checks for syntax errors before a program is executed.
What is the compiler?
When a double is more precise than the memory allotment allows, this type of error occurs.
What is a round-off error?
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?
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?
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?
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?
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?
A method signature consists of these two components.
What is the method name and the ordered list of parameter types?
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?
Concatenating a String with any object implicitly calls this method on the object.
What is toString()?