Chapter 2 Flashcards
algorithm
Statements that describe how a problem is solved in terms of the actions to be executed, and specify the order in which these actions should be executed. Algorithms can help the programmer plan a program before writing it in a programming language.
assignment operator
(=) Assigns a value to a variable
Assignment statement
A simple statement that assigns a value to a variable using an assignment operator (=). When a value is assigned to a variable, it replaces the previous value of the variable, which is destroyed.
Byte type
A primitive data type that represents an integer in a byte. The range of a byte value is from 2^7(-128) to (2^7)-1 (127)
Casting
The process of converting a primitive data type value into another primitive type.
Data type
Used to declare variables to indicate what kind of value the variable can hold.
declare variables
Declares a variable with a data type.
decrement operator
(–)
double type
A primitive data type that represents double precision floating-point numbers with 14 to 15 significant digits of accuracy.
expression
Represents a computation involving values, variables, and operators, which evaluates to a value.
final keyword
A modifier that specifies a constant.
float type
A primitive data type that represents single precision floating-point numbers with 6 to 7 significant digits of accuracy. The double type is used to represent double precisions with 14 to 15 significant digits of accuracy.
floating-point number
A number that includes a fractional part.
identifier
A name of a variable, method, class, interface, or package.
Increment Operator
(++)
incremental coding and testing
A programming methodology that develops and tests programs incrementally. This approach is efficient and productive. It helps eliminate and isolate errors.
int type
A primitive data type that represents an integer in the range from -2^31 (-2147483648) to (2^31)-1 (2147483647
IPO
Stands for Input, Process, Output
literal
A constant value that appears directly in the program. A literal may be numeric, character, boolean, or null for object type.
long type
A primitive data type to represent an integer in the range from -2^63 to (2^63)-1
narrowing a type
Casting a variable of a type with a larger range to a variable of a type with a smaller range.
operand
Are the values operated by an operator.
operator
Operations for primitive data type values. Examples of operators are +, -, /, and %.
overflow
When a variable is assigned a value that is too large (in size) to be stored, it causes overflow.