📜 Best Practices
The idea behind Effective Java is to utilize and/or adapt the usage of varies tools in the Java developers toolkit. It has been separated into 11 topics, which range from object creation to serialization. Each topic has a number of recommendations, where Joshua Bloch goes into the how and why, you should use these coding recommendations.
Based on previous experiences, I find that my learning process improves from using the Feynman technique. I therefore thought that I would write my own abridged versions of Joshua’s recommendations. My hope being that they would stick better to my own memory and so that they perhaps could be shared with other developer, which had not read or known the book.
1. Use Static Factory Methods Instead Of Constructors
Instead of overloading multiple constructors with different arguments, just make static methods. This way you can explain the intent of each constructed objects, regardless of it being the same class.