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. We write apps in the Java language.

In an app we can write a literal such as 10 or “John” to represent a fixed value such as a number or a piece of text. To represent a value that can change as the app is executed, we would have to write a different kind of expression, called a variable.

The Java language has several rules about how literals can be written. A numeric literal can contain digits, but not commas, blanks, or punctuation marks such as the dollar sign. A string literal (representing a piece of text) must be enclosed in double quotation marks. And a boolean literal must be either true or false, written in lowercase.