Before we get into our lesson, let's quickly review reference data types—you'll see why this is important soon. Unlike primitive types which hold actual values, reference types store memory addresses that point to objects. Assigning one reference variable to another makes them point to the same object, creating aliases of the same object.
Back to Boolean Expressions and if Statements
Lesson PreviewLesson 7 of 8 in this unit
3.7 Comparing Objects
Part of Boolean Expressions and if Statements in AP® Computer Science A. Read the opening section, then create a free account for the full interactive lesson, practice, and progress tracking.
In this unit
8 lessons
- 3.1Boolean ExpressionsPreview lesson
- 3.2if StatementsPreview lesson
- 3.3if-else StatementsPreview lesson
- 3.4else-if StatementsPreview lesson
- 3.5Compound Boolean ExpressionsPreview lesson
- 3.6Equivalent Boolean Expressions: De Morgan's LawsPreview lesson
- 3.7Comparing ObjectsThis lesson
- 3.8EXTRA: Ternary OperatorsPreview lesson
Continue the full lesson in Stellar
Create a free account to unlock the remaining sections, checkpoints, course practice, and progress tracking for AP® Computer Science A.