O'Reilly logo

Java SE 7 Programming Essentials by Michael Ernest

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 9

Inheriting Code and Data in Java

You’ve come a long way already in this book. In this chapter and the next two, you get the payoff: learning how to inherit code, create so-called pure types, and examine a type system. As I cover each of these topics, you’ll get your first look at moving from writing programs that happen to be Java classes to writing classes that can be used to build multiple programs.

It’s a challenging step to move from writing code you need right now to writing code you can reuse. It is a practice that takes time to master. You’ll start in this chapter by understanding how you can extend code that’s already been written.

In this chapter, I’ll cover the following topics:

  • Extending a class
  • Using the super keyword

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