In a computer, the memory is defined as a collection of numerous bytes. The main use of memory is to store and retrieve data. To do so, we require a concept of variables.
Variables are defined as identifiers which are used to locate bytes that consist of data. To use a variable we need to declare the variable.
Rules to declare variable are:
- The name of the variable must be specified.
- The type of data to be stored must be specified.
Datatypes are used to specify the type of data stored in variables.
various types of information that can be stored in the object are :
- Real Numbers
- Boolean type
Syntax: Datatype variableName;