Chapter 2 Defenitions Flashcards
Constant
Describes values that cannot be changed during an execution of an application
Literal constant
A value that is taken literally at each use
Numeric constant
A number whose value is taken literally at each use
Unnamed constant
Has no identifier associated with it
Variable
Named memory location that you can use to store a value
Data type
The type of data that can be stored there, how much memory it occupies, and what type of operations can be performed on the data
Primitive type
a simple data type, For Java these are byte, short, int, long, float, double, char, and boolean
Reference type
Complex data types that are constructed from primitive types
Variable declaration
statements that reserves a named memory location
Strongly typed language
One in which each variable has a well-defined type that limits the operations you can perform with it; implies that variable must be declared before use
Camel casing
Style in which an identifier begins with a lowercase letter and subsequent words with the identifier are capitalised
Assignment operator
The equal sign (=); any value to the right of the equal sign is assigned to the variable to the left of the equal sign
Initialisation
Is an assignment made when you declare a variable
Assignment
The act of providing a value for a variable
Associativity
Refers to the order in which the operands are used with the operators
lvalue
An expression that can appear on the left side of an assignment statement
rvalue
An expression that can appear on the right side of an assignment statement
uninitialised variable
one that has not been assigned to a value
garbage value
unknown value stared in a uninitialised variable
named constant
named memory location whose assigned value cannot change during program execution
symbolic constant
a named constant
The keyword ‘final’
To indicate something is a named constant declaration
blank final
final variable that has not yet been assigned a value
magic number
A value that does not have an immediate, intuitive meaning or number that cannot be explained without additional knowledge = unnamed constant
Scope of a data item
the area in which it is visible to a program and in which you can refer to it using its simple identifier
block of scope
code contained between a set of curly braces
Concatenated
Describes values that are attached end to end
null string
an empty string created by typing a set of quotes with nothing between them