Chapter 9. Object-Oriented Programming

In this chapter we will discover that in Java, classes are fundamental to just about everything. We will begin to understand why the software engineers at Sun Microsystems back in the early 1990's made Java the way they did.

We have already talked about reusing other people's code, specifically the Android API, but in this chapter, we will really get to grips with how this works and learn about object-oriented programming (OOP) and how to use it.

In short, we will cover the following topics:

  • What OOP is including encapsulation, inheritance, and polymorphism
  • Writing and using our first, very own class
  • Encapsulation in depth and how it helps us
  • Inheritance in depth and how to take full advantage of it
  • Polymorphism ...

Get Android Programming for Beginners 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.