Mastering Control Flow in Java

0.0(0)
Studied by 0 people
0%Unit 2 Mastery
0%Exam Mastery
Build your Mastery score
multiple choiceMultiple Choice
call kaiCall Kai
Supplemental Materials
Card Sorting

1/51

Last updated 8:25 PM on 3/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

52 Terms

1
New cards

Boolean expression

A statement that evaluates to either true or false.

2
New cards

Relational operators

Operators that compare two values and return a boolean result.

3
New cards

== operator

Tests if two values are equal.

4
New cards

!= operator

Tests if two values are not equal.

5
New cards

< operator

Tests if the left value is less than the right value.

6
New cards

<= operator

Tests if the left value is less than or equal to the right value.

7
New cards

operator

Tests if the left value is greater than the right value.

8
New cards

= operator

Tests if the left value is greater than or equal to the right value.

9
New cards

Logical operators

Operators used to combine multiple boolean conditions.

10
New cards

Short-circuit evaluation

Method where evaluation of boolean expressions stops as soon as the result is determined.

11
New cards

AND (&&)

True only if both operands are true.

12
New cards

OR (||)

True if at least one operand is true.

13
New cards

NOT (!)

Inverts the boolean value.

14
New cards

De Morgan’s Laws

Rules that describe how to simplify negated boolean expressions.

15
New cards

!(A && B)

Equivalent to !A || !B.

16
New cards

!(A || B)

Equivalent to !A && !B.

17
New cards

Select Statement

Allows execution of code segments based on conditions.

18
New cards

if statement

Executes code only if the condition is true.

19
New cards

if-else statement

Provides an alternative path if the condition in if is false.

20
New cards

Block scope

The scope of variables declared in a block of code surrounded by braces.

21
New cards

== for primitives

Used to compare the values of primitive types.

22
New cards

.equals() for objects

Used to compare the content of objects, specifically String.

23
New cards

while loop

A loop that continues as long as the condition is true.

24
New cards

Pre-test loop

A loop that tests its condition before executing its body.

25
New cards

Digit extraction algorithm

An algorithm to extract digits from an integer using division and modulo.

26
New cards

for loop

A loop used for definite iteration with a known number of repetitions.

27
New cards

Initialization

The first step in a for loop where a loop control variable is set.

28
New cards

Iteration for for loop

The steps through which a loop control variable changes during each loop execution.

29
New cards

Nested loops

A loop inside another loop.

30
New cards

Standard range formula

Formula to calculate the number of iterations in loops.

31
New cards

Drawing a trace table

A method for visualizing variable changes across iterations.

32
New cards

Confusing = and == mistake

Using assignment instead of equality check in conditions.

33
New cards

String comparison error

Using == instead of .equals() for string comparisons.

34
New cards

The Semicolon of Death

Placing a semicolon at the end of a for loop, terminating it prematurely.

35
New cards

Off-by-One Error (OBOE)

A common mistake where boundary conditions are incorrectly set.

36
New cards

Infinite Loop

A loop that never ends due to a condition always being true.

37
New cards

Arithmetic exception in short-circuiting

Error caused by misordering of conditions that leads to division by zero.

38
New cards

Flow of a program

The sequence in which statements or expressions are executed.

39
New cards

Logic flow

The direction or pathway that a program's execution follows.

40
New cards

Condition checking

Assessing boolean expressions before executing actions.

41
New cards

Boolean condition

An expression that evaluates to true or false used in control statements.

42
New cards

Comparison of objects

How instances of classes are checked for equality or reference.

43
New cards

Memory citation

The reference to the memory location of an object.

44
New cards

Trace table

A table that records variable states at each iteration of a loop.

45
New cards

Control flow statements

Programming constructs that control the order of execution of untimed sequences.

46
New cards

Boolean logic

The branch of algebra where the values of variables are true and false.

47
New cards

Evaluation of boolean expressions

The process of determining the truth value of boolean statements.

48
New cards

Efficient coding

Writing code that minimizes unnecessary evaluations or memory usage.

49
New cards

AP Java subset

A simplified version of Java used for educational purposes in AP courses.

50
New cards

Code execution

The running of programmed instructions by a computer.

51
New cards

Arithmetic operators

Operators used for mathematical calculations in programming.

52
New cards

Boolean variables

Variables that can hold only true or false values.

Explore top flashcards

flashcards
faf
40
Updated 956d ago
0.0(0)
flashcards
faf
40
Updated 956d ago
0.0(0)