Variables

Recall that you can use a variable to store the results of an expression in memory and use them later in the program.

type name;                       // declare
name = value or expression;        // assign a value
...
type name = value or expression;   // declare-and-initialize together

Examples:

double iphonePrice;
iPhonePrice = 299.95;

int siblings = 3;
System.out.println("I have " + siblings + " brothers/sisters.");