Java 9 with JShell
上QQ阅读APP看书,第一时间看更新

Summary

In this chapter, you learned about an object's life cycle. You also learned how object constructors work. We declared our first simple class to generate a blueprint for objects. We understood how types, variables, classes, constructors, instances, and garbage collection work with live examples in JShell.

Now that you have learned to start creating classes and instances, we are ready to share, protect, use, and hide data with the data encapsulation features included in Java 9, which is what we are going to discuss in the next chapter.