Introduction to Object Oriented Programming

Object-Oriented Programming (OOP) makes it easy to do exceptional things. A simple analogy could be drawn with a machine, perhaps a car. When you step on the accelerator, a whole bunch of things happens under the hood. We don't need to understand about combustion or fuel pumps because a smart engineer has provided an interface for us. In this case, a mechanical interface—the accelerator pedal.

Take the following line of Java code as an example; it will look a little intimidating:

locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER)

However, once you learn that this single line of code searches Space for the available satellites and then communicates with them in orbit around the Earth while ...

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