Know Your Java?
summary
Shows concrete failure modes and fixes: changing a List to a Collection makes remove(1) call remove(int) vs remove(Object) so the element at index 1 gets deleted; replacing a declared Collection with var infers ArrayList changes available overloads; Arrays.asList creates a fixed‑size list so add throws but set succeeds (use List.of for immutability); streams with side effects break under concurrency and lazy evaluation and parallel() / sequential() last wins so pure functions and collectors avoid nondeterministic bugs.
AI-written summary · about
chapters (8)
- 0:00Introduction to Java pitfalls
- 4:41List vs Collection remove behavior
- 14:06Type inference pitfalls with var
- 21:12Arrays.asList vs List.of
- 33:46Side effects in streams
- 49:01Lazy evaluation in streams
- 54:52Stream execution thread behavior
- 1:00:01Conclusion and key takeaways








