Unit 2 - Data Basics: Variables
Diapositivas del conjunto (5)
-
- Variable: is a named memory location which temporarily stores dat that can change while the program is running.\\
- Final: is named memory location which temporarily stores data that remains the same throughout the execution of the program.
- Type: indicate what kind of value it will store.
- The name of the variable is know as its identifier.
- A variable is given a value through an assignment statement.
-
- Assign short, int or long data when a variable is whole number
- Assign float or double when decimals are needed.
- Assign char if the variable will always contain only one character.
-
- All variable names must begin with a letter of an alphabet, underscore _ OR $
- Variables names may alsos contain letters and and th digits 0 to 9 no spaces
- Uppercase characters are distinct from lowercase characters. Using ALL are primarily used to identify constant variables
-
All Variables must be declared before they can be used
- Choose the type you need
- Choose name for variable
- use the following format for a declaration statement.
- you may declare more than one variable.
- you may initialize a variable
Información
- Descripción
- Diapositivas sobre Unit 2 - Data Basics: Variables, creado por mamoun diab el 25/02/2017.
- Creado por
- mamoun diab
- Visitas
- 4
- Valoración