Variable and Data Type
Variable is a space in memory where we can store data. It helps to access the data easily.
A data type defines size and type of information stored in a variable. Data types help in memory management. It helps to assigns the memory depending upon the type of data type.
Most importantly Java has a numerous data type and all data types are predefined, which is used to store a large amount of information.
There are two main categories of data type primitive and non-primitive which classified the various data type. The following diagram classified the primitive data types and non-primitive data types:
Contributed by: Poonam Tomar