AP CSA Unit 3: Boolean Expressions & Operators

studied byStudied by 0 people
0.0(0)
Get a hint
Hint

Logical Operators

1 / 15

16 Terms

1

Logical Operators

Can be used to connect boolean expressions to make more complex expression. NOT ! AND && OR ||

New cards
2

Short Circuit Evaluation

When the result of a logical expression using && or || can be determined by evaluating only the first Boolean operand, the second is not evaluated.

New cards
3

Nested if Statements

The process of placing if statements within if statements.

New cards
4

Truth Tables

A truth table is a table used in logic for comparing Boolean expressions.

New cards
5

Aliases

Two object references are considered aliases when they both reference the same object.

New cards
6

Reference equality

Equality operator (==) compares the references (addresses in memory) of 2 objects

New cards
7

Logical equality

Compares the data of the objects instead of the value of the references. Uses the .equals() method.

New cards
8

Relational Operators

== , !=. <. > , <=, >= These allow for the comparison or primitive type values. The result of these expressions can be stored as a Boolean value.

New cards
9

If Statement

An if statement lets you ask a question to the program and only run code if the answer is true.

New cards
10

Control Structure

A control structure lets us change the flow of the code.

New cards
11

Conditional Statement

A statement that evaluates to true or false.

New cards
12

If Else Statement

Control structure that lets us run either one section of code or another depending on a test.

New cards
13

Control Structure

A control structure lets us change the flow of the code.

New cards
14

else statement

Executes code only if all conditions are false

New cards
15

Condition

A condition is code that you put inside an if statement or while-loop.

New cards
16

else if Statement

A statement that executes if the previous statements are false and this statement is true

New cards

Explore top notes

note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 56 people
... ago
5.0(4)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 29 people
... ago
5.0(1)
note Note
studied byStudied by 22 people
... ago
5.0(1)
note Note
studied byStudied by 42 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 484 people
... ago
4.9(11)

Explore top flashcards

flashcards Flashcard (53)
studied byStudied by 19 people
... ago
5.0(1)
flashcards Flashcard (37)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (78)
studied byStudied by 105 people
... ago
5.0(1)
flashcards Flashcard (86)
studied byStudied by 65 people
... ago
4.0(3)
flashcards Flashcard (26)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (54)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (78)
studied byStudied by 14 people
... ago
5.0(2)
flashcards Flashcard (79)
studied byStudied by 392 people
... ago
5.0(4)
robot