In this chapter, we will cover the following recipes:
- Implementing Object-Oriented Design (OOD)
- Using inner classes
- Using inheritance and aggregation
- Coding to an interface
- Creating interfaces with default and static methods
- Creating interfaces with private methods
- A better way to work with nulls using Optional
- Using the utility class Objects
The recipes in this chapter do not require any prior knowledge of OOD. However, some experience of writing code in Java would be beneficial. The code samples in this chapter are fully functional and compatible with Java 11. For better understanding, we recommend that you try to run the presented examples.
We also encourage you to adapt the tips and recommendations in this chapter to your needs in the context of your team experience. Consider sharing your newfound knowledge with your colleagues...