Chapter 8: Object-Oriented Programming

In this chapter, we will discover that in Java, classes are fundamental to everything. We have already talked about reusing other people's code, specifically Android code, but in this chapter, we will really get to grips with how this works and learn about object-oriented programming as well as how to use it. Here is what is coming up in this chapter:

  • An introduction to object-oriented programming, including encapsulation, inheritance, and polymorphism
  • Writing and using our first, very own class
  • An explanation of encapsulation and how it is our friend
  • Inheritance—a first look and how to take advantage
  • An introduction to polymorphism
  • Static classes
  • Abstract classes and interfaces
  • Starting the next game ...

Get Learning Java by Building Android Games - Third Edition 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.