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