What is DATA?
Data is the representation of anything.
so it can be either constant or variables.
So from the basic mathematical definition:
Constant: Entity whose value can not be changed.
Variable: Entity whose value can be changed.
consider we have an equation:
then the value of x will be -5 and 5.
You can notice that value of x is changing. so it is called variable and the value 5 or -5 is constant.
we will mainly focus on variable.
so in programming terms, variables are defined as:
Variables are just a placeholder.
There are 2 types of Data:
- Non primitive
Primitive types are system defined data types. They are:
The non-primitive data types are referred as user defined data types. Example:
- objects ..etc