Variables are used to store values in virtually every computer program. For example, if you want to store coffee in a container, you would use a styrofoam cup and not a Dixie cup. Otherwise, you would burn your hands. Likewise, if you want to store chicken soup in a container, you would use a bowl and not a plate. Otherwise, the soup would spill off of the edge of the plate.
Most computer languages have a select number of different data types .
You must select the proper data type for each variable that you use in a program in order to program efficiently. An int variable uses 4 bytes of memory. An int variable can store a number as low as -2,147,483,648. An int variable can store a number as high as 2,147,483,647. To store decimal numbers in a variable, we use a variable of the double data type.