ava programming language best practices from Josh Bloch
Each chapter of Effective Java, Third Edition, consists of several "items," each presented in the form of a short, stand-alone essay that provides specific advice, insight into Java platform subtleties, and code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why. While coverage is through Java 9, this guidance covers core Java features every programmer works with, regardless of which version.
- Concurrency: write clear, correct, well-documented concurrent programs
- Objects: creating and destroying; common methods
- Classes and interfaces: guidelines for making them usable, robust, and flexible
- Generics: tell the compiler what types of objects are permitted in each collection for safer and clearer programs
- Enums and annotations: two special-purpose families of reference types
- Functions: break a big job into smaller pieces that might well be written by different people separated by both time and space.
- Lambdas and streams: create function objects with more ease
- Method designs: treat parameters and return values; design method signatures; document methods
- Exceptions: improve a program's readability, reliability, and maintainability
- Object serialization: the dangers of serialization and how to minimize them
- General programming:
- local variables
- control structures
- libraries
- data types
- reflection
- native methods
- optimization
- naming conventions
Programmers still consider this the best book on Java programming today.