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.

In the instructions of an app, we can write a literal such as 10 or "John" to represent a value that is a number or a piece of text. We can also write the name of a variable, which is a container inside the device that can hold a value. Typical variable names might be “x” or “y” or “greeting”.

We tell the device to manipulate numbers and text by writing expressions such as the following, containing literals and variables.

x + y
x − 10
greeting + ", John!"

The plus and minus signs are called operators, and the values they work on are their operands. The result computed by the operator is called the value of the expression.

A bigger expression can be built out of smaller ones by using an operator to paste together the smaller expressions. For example, we can take the expressions a * b and c * d containing the multiplication operator *, and paste them together using the addition operator + to form the bigger expression a * b + c * d