click below
click below
Normal Size Small Size show me how
Ch 3 CompSci
Term | Definition |
---|---|
package | a directory of classes that are related to each other |
address | the location of a value in computer memory, often represented as a hexadecimal integer |
import statement | a statement that allows programs to use classes defined in other packages |
literal | a value that appears in source code. For example, "Hello" is a string literal, and 74 is an integer literal |
magic number | a number that appears without explanation as part of an expression. It should generally be replaced with a constant |
constant | a variable, declared as final, whose value cannot be changed |
format string | the string in System.out.printf that specifies the format of the output |
format specifier | a special code that begins with a percent sign and specifies the data type and format of the corresponding value |
stack trace | an error message that shows the methods that were running when an exception occurs |
type cast | an operation that explicitly converts one data type into another. In Java, it appears as a type name in parentheses, like (int) |
modulo | an operation that yields the remainder when one integer is divided by another. In Java, it is denoted with a percent sign |
modulus | the value of b in the expression a % b. It often represents unit conversions, such as 24 hours in a day, 60 minutes in an hour, etc. |
elements of java from largest to smallest | package class method statement expression token |
library | a collection of packages and classes that are available for use in other programs |
token | the smallest unit of source code, such as an individual word, literal value, or symbol |
prompt | a brief message displayed in a print statement that asks the user for input |