Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

---

tags: [ap, ap/csa, notes, code]


---

# AP CSA Unit 3 Notes

- **Unit 3**
- in operators like `>=` and `<=`, the equal comes after the operator, not
the other way around
- in `if`/`else if`/`else` statements, the curly brackets aren't necessary if
the code is only one line
- DeMorgan's laws
- `not (A or B) = (not A) and (not B)`
- `not (A and B) = (not A) or (not B)`
- comparison in Java
- primitive types are compared with `==`
- reference types are compared with `.equals()`
- using `==` on reference types will just tell you if they point
to the same object, not if their values are the same
- some types have their own ways (`Arrays.equals()`, for example)

You might also like