19
Inheritance: Packages: Interfaces
LEARNING OBJECTIVES
At the end of this chapter, you will be able to understand and use concepts and programs relating to
- Extending a class from an existing class, concepts in multilevel inheritance.
- Super- and subclass and overriding of superclass methods.
- Run-time polymorphism and abstract class.
- Packages and their usage.
- Interfaces.
19.1 Introduction
This chapter introduces you to one of the most powerful features of any objective-oriented language, i.e. inheritance. Inheritance is a tool offered by Java to create another class from an existing class. We call this creation as extending a class. In the literature, the class that is a starting point or source of extension is called base class. Java calls ...
Get Object-oriented Programming Using C++ and Java 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.