Know Your Java
summary
Shows precise gotchas and fixes: passing an int to a variable-typed list can call List.remove(int) vs Collection.remove(Object) so elements vanish unexpectedly; Arrays.asList accepts set but not add while List.of produces truly immutable lists; mutating an external collection inside a parallel stream yields nondeterministic sizes so parallel stream + shared mutation = lost or duplicate elements; calling an overridable method from a base constructor triggers null fields and a NullPointerException.
AI-written summary · about
chapters (7)
- 0:00Introduction to Java pitfalls
- 2:52Overloading and type inference
- 7:41Immutable collections
- 11:57Shared mutability in streams
- 21:56Pure functions and laziness
- 31:38Stream parallelism mechanics
- 39:48Constructor risks and conclusion
related talks
01h 01mKnow Your Java?
41mKnow Your Java?
49mJava Collections Puzzlers
47mThe Dark Side of Java 8 - Lessons Learned
34mFunctional Programming Anti-Patterns in Java
28m11 Crazy Things I Didn't Know You Could Do With Java Until I Got...
54mJava Puzzlers NG: The strange, the bizarre, and the wonderful
57mTen Common mistakes made in Functional Java
