O'Reilly logo

Object-oriented Programming Using C++ and Java by Anand Vasappanavara, Gautam Vasappanavara, Ramesh Vasappanavara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required