A data type communicates to program what kind of variable is needed in operation.
Here is a quick list of data types.
- String – Combination of alphanumeric characters.
- Byte – A whole number between 0 and 255 (1 byte).
- Integer – A whole number between -32768 and 32768 (2 bytes)
- Long – A whole number outside the range of integer data type (4 bytes)
- Sing le – To store a decimal number (not commonly used) (4 bytes)
- Double – To store a decimal number with higher decimals (8 bytes)
- Currency – Money values (8 bytes)
- Date – Stores date and time (8 bytes)