Chapter 2 Defenitions Flashcards

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
Q

Scope of a data item

A

the area in which it is visible to a program and in which you can refer to it using its simple identifier

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

block of scope

A

code contained between a set of curly braces

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

Concatenated

A

Describes values that are attached end to end

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

null string

A

an empty string created by typing a set of quotes with nothing between them

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

integer

A

a whole number without decimal places

30
Q

byte

A

very small integers -128 - 127

31
Q

short

A

small integers -32768 - 32767

32
Q

long

A

very large integers

33
Q

lossy conversion

A

conversion in which some data is lost

34
Q

lossless conversion

A

conversion in which no data is lost

35
Q

boolean variable

A

can hold only true or false values

36
Q

relational operator

A

compares two items; always has a boolean value

37
Q

comparison operator

A

relational operator

38
Q

Floating -point

A

number that contains decimal positions

39
Q

a float data type

A

can hold a floating point value of up to 6 or 7 significant digits of accuracy

40
Q

double data type

A

can hold a floating point value of up to 14 or 15 significant digits of accuracy

41
Q

significant digits

A

the mathematical accuracy of a value

42
Q

char data type

A

holds a single character

43
Q

String

A

Java class that provides you with the means for storing and manipulating character strings

44
Q

escape sequence

A

begins with a backslash followed by a character; the pair represents a single character

45
Q

Standard input device

A

the keyboard

46
Q

token

A

a unit separated with whitespace

47
Q

prompt

A

a message that requests and describes user input

48
Q

Echoing the input

A

means to repeat the user’s entry as output so the user can visually confirm the entry’s accuracy

49
Q

keyboard buffer/type-ahead buffer

A

a small area of memory where key strokes are stored before they are retrieved into a program

50
Q

To consume an entry

A

is to receive and discard it without using it

51
Q

input dialog box

A

Asks a question and provides a text field in which the user can enter a response

52
Q

Type-wrapper classes

A

contained in java.lang package, includes methods that can process primitive data type values

53
Q

parse

A

break into component parts

54
Q

confirm dialog box

A

Displays the options; Yes, No and Cancel

55
Q

Standard arithmetic operators

A

are used to perform calculations with values

56
Q

operand

A

A value used in an arithmetic statement

57
Q

Binary operators

A

require 2 operands

58
Q

Floating-point division

A

is the operation in which 2 values are divided and either both or are floating- point values

59
Q

Integer division

A

is the operation in which 2 values are divided and either both or are integers, the result contains no fractional part

60
Q

The remainder operator

A

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
Q

Modulus operator

A

Abbreviated as mod, alternative name for remainder operator

62
Q

Operator precedence

A

the rules for the order in which parts of a mathematical expression are evaluated

63
Q

Type conversion

A

the process of converting one data type to another

64
Q

unifying type

A

is a single data type to which all operands in an expression are converted

65
Q

implicit conversion

A

automatic transformation of one data type to another

66
Q

Promotion

A

implicit conversion

67
Q

Type casting

A

Forces a value of one data type to be used as a value of another type

68
Q

Cast operator

A

performs an explicit type conversion; it is created by placing the desired result type in parentheses before the expression to be converted

69
Q

explicit conversion

A

is the data type transformation caused using a cast operator

70
Q

unary cast operator

A

A more complete name for the cast operator that performs explicit type conversions

71
Q

unary operator uses how many operands?

A

uses only one operand