O'Reilly logo

Learn Java for Android Development by Jeff JavaJeff Friesen

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

Chapter 3

Learning Object-Oriented Language Features

An object-based language encapsulates attributes and behaviors in objects. To be known as an object-oriented language, the language must also support inheritance and polymorphism. This chapter introduces you to Java's language features that support these twin pillars of object orientation. Furthermore, the chapter introduces you to interfaces, Java's ultimate abstract type mechanism.

Inheritance

Inheritance is a hierarchical relationship between entity categories in which one category inherits attributes and behaviors from at least one other category. For example, tiger inherits from animal (tiger is a kind of animal), car inherits from vehicle (car is a kind of vehicle), and checking account ...

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