Posts

Showing posts from June, 2019

Data Types

Image
Data Types Data types can mainly be divided into two types. They are primitive and non-primitive data types. Here are more details about primitive data types. boolean - It is a binary variable that can have two possible values.  Size= 1 bit.    Ex: - True(1) or False(0) char        - It is a character data type.  Size= 2 bytes.                   Ex: - character, letter, ASCII value byte        - It is a numeric data type.  Size= 1 bytes. short      - It is a numeric data type.  Size= 2 bytes. int           - It is a numeric data type.  Size= 4 bytes. long        - It is a numeric data type.  Size= 8 bytes. float        - It is a fractional data type.  Size= 4 bytes. double     - It is a fractional   data type.  Size= 8 bytes. Here are some details about non-primitive data types. String      - Including characters, spaces and numbers. Array       - It is a data structure that can store a group of elements.