A computer is a machine that follows a list of instructions called a program. An Android device is a computer, and an app is a program. Inside the device are containers called variables that hold values such as numbers or pieces of text.

An object is a variable that is special in two ways. First, it can contain smaller variables inside it, called the fields of the object. For example, a MediaPlayer object might contain fields holding the name of the sound file it is playing, the volume level, the current position of the playback in the file, and an indication of whether the file should be played in an infinite loop.

Second, attached to an an object we can have lists of instructions—in effect, little programs—called methods. For example, our MediaPlayer object might have methods named play, pause, and stop. The methods of an object can use the fields inside the object to which they are attached. For example, the play method would need to use all four of our fields.

When an instruction in an app tells the device to execute a method of an object, we say we are calling the method. For example, we can call the play method of the MediaPlayer to make it execute its instructions for playing a sound file.

When we call a method of an object, we can give it pieces of information to work with called input parameters. For example, a MediaPlayer object has a method named setDataSource(String) that takes one input parameter of type String—a series of characters—and determines the media file from which the MediaPlayer will draw its input. A given method always takes the same number of parameters, and they must always be expressions that can be stored in variables of the specified types.