AP CSA Unit 3: Boolean Expressions & Operators

studied byStudied by 1 person
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 132 people
... ago
5.0(1)
note Note
studied byStudied by 55 people
... ago
4.5(2)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 30 people
... ago
5.0(1)
note Note
studied byStudied by 37 people
... ago
5.0(1)
note Note
studied byStudied by 6 people
... ago
5.0(1)
note Note
studied byStudied by 16 people
... ago
5.0(1)
note Note
studied byStudied by 23129 people
... ago
4.8(187)

Explore top flashcards

flashcards Flashcard (21)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (93)
studied byStudied by 13 people
... ago
5.0(2)
flashcards Flashcard (27)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (58)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (83)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (30)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (68)
studied byStudied by 29 people
... ago
5.0(2)
robot