| Terms |
Definitions |
|
What Double method can you use to detect whether a floating-point number has the special value Not a Number (NaN)?
|
isNaN
|
|
To invert the value of a boolean, which operator would you use?
|
The logical complement operator "!".
|
|
An ___ is a container object that holds a fixed number of values of a single type.
|
An array is a container object that holds a fixed number of values of a single type.
|
|
The term "instance variable" is another name for ___.
|
The term "instance variable" is another name for non-static field.
|
|
A variable declared within the opening and closing parenthesis of a method signature is called a ____.
|
A variable declared within the opening and closing parenthesis of a method is called a PARAMETER.
|
|
What are the eight primitive data types supported by the Java programming language?
|
What are the eight primitive data types supported by the Java programming language? byte, short, int, long, float, double, boolean, char
|
|
The following code snippet is an example of a ___ expression. 1 * 2 * 3
|
a compound expression.
|
|
The term API stands for _____________?
|
The term API stands for Application Programming Interface.
|
|
Statements may be grouped into ___.
|
Statements may be grouped into BLOCKS.
|
|
What Integer method can you use to convert an int into a string that expresses the number in hexadecimal? For example, what method converts the integer 65 into the string "41"?
|
toHexString
|
|
Real-world objects contain______ and ____.
|
State and behavior
|
|
What methods would a class that implements the java.lang.CharSequence interface have to implement?
|
charAt, length, subSequence, and toString.
|
|
Statements are roughly equivalent to sentences in natural languages, but instead of ending with a period, a statement ends with a ___.
|
a semicolon.
|
|
A block is a group of zero or more statements between balanced ___ and can be used anywhere a single statement is allowed.
|
A block is a group of zero or more statements between balanced braces and can be used anywhere a single statement is allowed.
|
|
A blueprint for a software object is called a ________.
|
A blueprint for a software object is called a CLASS.
|
|
Expressions are the core components of ___.
|
Expressions are the core of STATEMENTS.
|
|
A local variable stores temporary state; it is declared inside a ___.
|
A local variable stores temporary state; it is declared inside a METHOD.
|
|
What is the value of the following expression, and why? Integer.valueOf(1).equals(Long.valueOf(1))
|
False. The two objects (the Integer and the Long) have different types
|
|
A namespace that organizes classes and interfaces by functionality is called a ______.
|
A namespace that organizes classes and interfaces by functionality is called a PACKAGE.
|
|
What Integer method would you use to convert a string expressed in base 5 into the equivalent int? For example, how would you convert the string "230" into the integer value 65?
|
valueOf. Here's how: String base5String = "230"; int result = Integer.valueOf(base5String, 5);
|
|
A software object's behavior is exposed through ______.
|
A software object's behavior is exposed through METHODS.
|
|
Operators may be used in building ___, which compute values.
|
Operators may be used in building EXPRESSIONS, which compute values.
|
|
Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data ______.
|
Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data ENCAPSULATION.
|
|
The term "class variable" is another name for ___.
|
The term "class variable" is another name for STATIC FIELD.
|
|
Common behavior can be defined in a ______ and inherited into a _____ using the _____ keyword.
|
Common behavior can be defined in a SUPERCLASS and inherited into a SUBCLASS using the EXTENDS keyword.
|
|
A collection of methods with no implementation is called an _____.
|
A collection of methods with no implementation is called an INTERFACE.
|
|
Which operator is used to compare two values, = or == ?
|
The == operator is used for comparison, and = is used for assignment.
|
|
A software object's state is stored in ___.
|
A software object's state is stored in FIELDS.
|
|
Character strings are represented by the class ___.
|
Character strings are represented by the class java.lang.String.
|