Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variables are used to store data.
- We create variables by "declaring" them.
- A variable declaration consists of a type and an identifier.
- //type identifier
- int number;
- The type determines what values the variable can store.
- Identifiers let developers know what the value is for - you choose the identifier.
- Values are set using the initialization operator: =
- number = 5;
- A value can be declared and initialized at the same time.
- int number = 5;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement