Variable:
- A variable is the name of a memory location.
- A variable is used to store a value.
- The value of a variable can change during program execution.
Rules for Variable Names in Java
- Variable name should start with a lowercase letter.
- Variable name can start with $ or _.
Example
byte tamilMark = 60;
Explanation:
- byte → data type
- tamilMark → variable name
- = → assignment operator
- 60 → value
- ; → end of statement
Top comments (0)