An object-based language is a language that encapsulates state and behaviors in objects. Java’s support for encapsulation (discussed in Chapter 3) qualifies it as an object-based language. However, Java is also an object-oriented language because it supports inheritance and polymorphism (as well as encapsulation). (Object-oriented languages are a subset of object-based languages.) In this chapter, we will introduce you to Java’s language features that support inheritance and ...
4. Discovering Inheritance, Polymorphism, and Interfaces
Get Learn Java for Android Development: Migrating Java SE Programming Skills to Mobile Development 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.