Chapter 2 Defenitions Flashcards

(71 cards)

1
Q

Constant

A

Describes values that cannot be changed during an execution of an application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Literal constant

A

A value that is taken literally at each use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Numeric constant

A

A number whose value is taken literally at each use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Unnamed constant

A

Has no identifier associated with it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Variable

A

Named memory location that you can use to store a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data type

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Primitive type

A

a simple data type, For Java these are byte, short, int, long, float, double, char, and boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Reference type

A

Complex data types that are constructed from primitive types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Variable declaration

A

statements that reserves a named memory location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Strongly typed language

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Camel casing

A

Style in which an identifier begins with a lowercase letter and subsequent words with the identifier are capitalised

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Assignment operator

A

The equal sign (=); any value to the right of the equal sign is assigned to the variable to the left of the equal sign

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Initialisation

A

Is an assignment made when you declare a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Assignment

A

The act of providing a value for a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Associativity

A

Refers to the order in which the operands are used with the operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

lvalue

A

An expression that can appear on the left side of an assignment statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

rvalue

A

An expression that can appear on the right side of an assignment statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

uninitialised variable

A

one that has not been assigned to a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

garbage value

A

unknown value stared in a uninitialised variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

named constant

A

named memory location whose assigned value cannot change during program execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

symbolic constant

A

a named constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The keyword ‘final’

A

To indicate something is a named constant declaration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

blank final

A

final variable that has not yet been assigned a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

magic number

A

A value that does not have an immediate, intuitive meaning or number that cannot be explained without additional knowledge = unnamed constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
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
26
block of scope
code contained between a set of curly braces
27
Concatenated
Describes values that are attached end to end
28
null string
an empty string created by typing a set of quotes with nothing between them
29
integer
a whole number without decimal places
30
byte
very small integers -128 - 127
31
short
small integers -32768 - 32767
32
long
very large integers
33
lossy conversion
conversion in which some data is lost
34
lossless conversion
conversion in which no data is lost
35
boolean variable
can hold only true or false values
36
relational operator
compares two items; always has a boolean value
37
comparison operator
relational operator
38
Floating -point
number that contains decimal positions
39
a float data type
can hold a floating point value of up to 6 or 7 significant digits of accuracy
40
double data type
can hold a floating point value of up to 14 or 15 significant digits of accuracy
41
significant digits
the mathematical accuracy of a value
42
char data type
holds a single character
43
String
Java class that provides you with the means for storing and manipulating character strings
44
escape sequence
begins with a backslash followed by a character; the pair represents a single character
45
Standard input device
the keyboard
46
token
a unit separated with whitespace
47
prompt
a message that requests and describes user input
48
Echoing the input
means to repeat the user's entry as output so the user can visually confirm the entry's accuracy
49
keyboard buffer/type-ahead buffer
a small area of memory where key strokes are stored before they are retrieved into a program
50
To consume an entry
is to receive and discard it without using it
51
input dialog box
Asks a question and provides a text field in which the user can enter a response
52
Type-wrapper classes
contained in java.lang package, includes methods that can process primitive data type values
53
parse
break into component parts
54
confirm dialog box
Displays the options; Yes, No and Cancel
55
Standard arithmetic operators
are used to perform calculations with values
56
operand
A value used in an arithmetic statement
57
Binary operators
require 2 operands
58
Floating-point division
is the operation in which 2 values are divided and either both or are floating- point values
59
Integer division
is the operation in which 2 values are divided and either both or are integers, the result contains no fractional part
60
The remainder operator
Is the percent sign; when it is used with two integers, the result is an integer with the value of the remainder after devision takes place
61
Modulus operator
Abbreviated as mod, alternative name for remainder operator
62
Operator precedence
the rules for the order in which parts of a mathematical expression are evaluated
63
Type conversion
the process of converting one data type to another
64
unifying type
is a single data type to which all operands in an expression are converted
65
implicit conversion
automatic transformation of one data type to another
66
Promotion
implicit conversion
67
Type casting
Forces a value of one data type to be used as a value of another type
68
Cast operator
performs an explicit type conversion; it is created by placing the desired result type in parentheses before the expression to be converted
69
explicit conversion
is the data type transformation caused using a cast operator
70
unary cast operator
A more complete name for the cast operator that performs explicit type conversions
71
unary operator uses how many operands?
uses only one operand