image

CHAPTER

5

Object Creation and Member Visibility

imagen the last chapter, we covered inheritance in Java. Inheritance allows you to extend the functionality of existing classes. In this chapter, you learn what happens when a subclass is instantiated. Without explicitly creating a superclass object, how can a subclass object access its members? You learn the object-creation process during the instantiation of a subclass. The main motive behind understanding this is to gain control over the object-initialization process. You will understand how to call ...

Get Java Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.