Chapter 10. 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 1990s 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 and how to use it.

In summary, we will cover the following topics:

  • What is OOP, including encapsulation, inheritance, and polymorphism
  • How to write and use our first class in an app

Before we get to what exactly OOP is, a quick warning.

Important memory management warning

I'm referring to our brain's memories for a change. If you try to memorize this chapter (or the next), you will have to make a lot of room in your brain and you will probably forget something really important in its place, such as going to work or thanking the author for telling you not to try and memorize this stuff.

A good goal will be to try and just-about get it. This way, our understanding will become more rounded. You can then refer to this chapter (or the next) for a refresher when needed.

Tip

It doesn't matter if you don't completely understand everything in this chapter straight away! Keep on reading and make sure to complete all the apps.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.226.232