Skip to main content

Discovering Inheritance, Polymorphism, and Interfaces

  • Chapter
  • First Online:
Learn Java for Android Development
  • 1433 Accesses

Abstract

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 polymorphism. Also, we will introduce you to interfaces, Java’s ultimate abstract type mechanism.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Peter Späth and Jeff Friesen

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Späth, P., Friesen, J. (2020). Discovering Inheritance, Polymorphism, and Interfaces. In: Learn Java for Android Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5943-6_4

Download citation

Publish with us

Policies and ethics