image

CHAPTER

4

Inheritance

imagene of the major benefits of object-oriented programming is code reuse. Programmers develop lot of code over time. If this code can be reused, they can save time and effort in developing and testing a new project. In structured programming, if the code is arranged in appropriate independent functions, it can be reused in future applications. For object-oriented programming, the inheritance feature you’ll learn about helps achieve code reuse. In the previous chapter, you learned to define classes. In this chapter, you learn how ...

Get Java Programming 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.