1. Integer
Integer types can hold whole numbers such as 123 and −96. The size of the values that can be stored depends on the integer type that we choose.
The range of values is calculated as −(2^{n−1}) to (2^{n−1})−1; where n is the number of bits required. For example, the byte data type requires 1 byte = 8 bits. Therefore, the range of values that can be stored in the byte data type is:
−(2^{8−1}) to (2^{8−1})−1
= −2^{7} to (2^{7}) 1
= −128 to 127
Type 
Size 
Range of values that can be stored 

byte 
1 byte 
−128 to 127 OR −2^{7} to (2^{7}) 1 
short 
2 bytes 
−32768 to 32767 OR −2^{15} to (2^{15}) 1 
int 
4 bytes 
−2,147,483,648 to 2,147,483,647 OR −2^{31} to (2^{31}) 1 
long 
8 bytes 
−9,223,372,036,854,775,808 to 9,223,372,036,854,755,807 OR −2^{63} to (2^{63}) 1 
2. Floating Point
Floating point data types are used to represent numbers with a fractional part. Single precision floating point numbers occupy 4 bytes and Double precision floating point numbers occupy 8 bytes. There are two subtypes, double can have both more significant digits, and a larger exponent. (Think scientific notation)
Type 
Size 
Digits that can be stored 

float 
4 bytes 
approximately 7 significant digits

double 
8 bytes 
approximately 16 significant digits

3. Character
Character data type char hold single symbols such as
't', 'T' , '%' , '5' etc.
Special characters can be created using the \ (backslash) to escape the special character.
'\n', '\t' , '\'' , '\\'
newline, tab, single quote, bacsklash
The char data type is 2 bytes (ascii only requires 1), but it can hold only a single character because char stores unicode character sets. It has a minimum value of ‘u0000’ (or 0) and a maximum value of ‘uffff’ (or 65,535, inclusive).
4. Boolean
Boolean data types are used to store values with two states: true or false.