effective-java-3e-source-code
effective-java-3e-source-code copied to clipboard
The source code from the third edition of Effective Java, with minor additions as necessary to make it runnable.
in item 37 on page 173, the second paragraph talks about "an EnumMap version and two stream-based versions". This is confusing and misleading because the second of the two "stream...
...and certainly not a package-private one. In Item 2, the abstract `Pizza` class declares an abstract `Builder` class. This abstract builder declares an abstract `build` method: `abstract Pizza build();`. I...
On lambdas and streams chapter there is this exercise:  The problem here is that variable words refer to a stream of lines so the program is processing lines not...
Not everyone can afford Intellij. please add the following to your gitIgnore: # eclipse specific git ignore *.pydevproject .project .metadata bin/** tmp/** tmp/**/* *.tmp *.bak *.swp *~.nib local.properties .classpath .settings/...
CHAPTER 11 CONCURRENCY Item 83: Use lazy initialization judiciously // Double-check idiom for lazy initialization of instance fields private FieldType getField() { FieldType result = field; // (1) if (result...
Dear Joshua, In example class `Intern` and method `intern` is race condition between line 18 and 19. It can also lead to memory leak. https://github.com/jbloch/effective-java-3e-source-code/blob/bdc828a7af2bdfac28e3c38bd7d1a2ae05736ccc/src/effectivejava/chapter11/item81/Intern.java#L19 Kindly regards, Marcin PS Thank...
In Item #90, the `readResolve()` method in the `SerializationProxy` class is mentioned in the book but it's missing in the source code.
I think there is one point about `toString()` which could be worth being mentioned in Item 12. - You should not misuse `toString()` for displaying objects in a user interface,...
Chapter 2 refers to item64.