SELU CMPS 161 Test 2 (Ch. 3-5)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/38

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

39 Terms

1
New cards

boolean data type

A primitive data type for Boolean values (true or false).

2
New cards

Boolean expression

An expression that evaluates to a Boolean value.

3
New cards

Boolean value

True or false.

4
New cards

conditional operator

The symbols ? and : appear together in a conditional operator: booleanExpression ? expression1 : expression2.

5
New cards

dangling else ambiguity

Describes a common mistake where an else clause is mismatch to an if clause.

6
New cards

debugging

Is to find errors in a program.

7
New cards

fall-through behavior

In a switch statement, once a case is matched, the statements starting from the matched case are executed until a break statement or the end of the switch statement is reached. This phenomenon is referred to as the fall-through behavior.

8
New cards

flowchart

Is a diagram that describes an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows.

9
New cards

lazy operator

Same as short-circuit operator.

10
New cards

operator associativity

Defines the order in which operators will be evaluated in an expression if the operators have the same precedence order.

11
New cards

operator precedence

Defines the order in which operators will be evaluated in an expression.

12
New cards

selection statement

A statement that uses if or switch statement to control the execution of the program.

13
New cards

short-circuit operator

Operators such as && and || that perform short-circuit evaluation.

14
New cards

char type

A primitive data type that represents a Unicode character.

15
New cards

encoding

Representing a character using a binary code.

16
New cards

escape character

The backslash \ is called an escape character.

17
New cards

escape sequence

A special notation, consisting of a backslash (\) followed by a character or a combination of digits.

18
New cards

format specifier

A format specifier specifies how an item should be displayed. An item may be a numeric value, a character, a Boolean value, or a string.

19
New cards

instance method

A method that must be invoked from a specific object.

20
New cards

static method

A method invoked from a class name.

21
New cards

supplementary Unicode

The original Unicode is 16-bit. Those characters that go beyond the original 16-bit limit are called supplementary characters.

22
New cards

Unicode

A code system for international characters managed by the Unicode Consortium. Java supports Unicode.

23
New cards

whitespace character

The characters ' ', \t, \f, \r, or \n are known as whitespace characters.

24
New cards

break statement

Break out of the current loop.

25
New cards

continue statement

Break out of the current iteration.

26
New cards

do-while loop

A loop construct that begins with the keyword do.

27
New cards

for loop

A loop construct that begins with the keyword for.

28
New cards

infinite loop

A loop that runs indefinitely due to a bug in the loop.

29
New cards

input redirection

Obtain the input from a file instead of from the console.

30
New cards

iteration

One time execution of the loop body.

31
New cards

loop

A structure that controls repeated executions of a block of statements.

32
New cards

loop body

The part of the loop that contains the statements to be repeated.

33
New cards

nested loop

Consists of an outer loop and one or more inner loops. Each time the outer loop is repeated, the inner loops are reentered, and all required iterations are performed.

34
New cards

off-by-one error

A common error in the loop because the loop is executed one more or one less time than it should have been.

35
New cards

output redirection

Write the output to a file instead of to the console.

36
New cards

posttest loop

The loop continuation condition is checked after the loop body is executed.

37
New cards

pretest loop

The loop continuation condition is checked before the loop body is executed.

38
New cards

sentinel value

A special input value that signifies the end of the input.

39
New cards

while loop

A loop construct that begins with the keyword while.