Professional Documents
Culture Documents
AP CSA Unit 3 Notes
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)