The Java programming language is statically-typed, which means that all variables must first be declared before they can be used.
Data types in Java specify how memory stores the values of the variable. Each variable has a data type that decides the value the variable will hold.

Primitive Data Types:

Primitive data types specify the size and type of variable values.
They store only single values and have no additional capabilities.

They are the building blocks of data manipulation and cannot be further divided into simpler data types.

**Boolean** - A boolean data type can store either True or False. They can be used to check whether two values are equal or not (basically in conditional statements to return True or False).
The default boolean value is False.

**Char** - The character data type stores a single character. It stores lowercase and uppercase characters, which must be enclosed in single quotes. 

**Int** - An integer type stores an integer number with no fractional or decimal places. Java has four integer types – byte, short, int, and long.

**Long** - long is a 64-bit signed two’s complement integer that stores values ranging from -9223372036854775808(-2^63) to 9223372036854775807(2^63 -1). It is used when we need a range of values more than those provided by int. Its default value is 0L. This data type ends with ‘L’ or ‘l’.

**Float **- It is a floating-point data type that stores the values, including their decimal precision. It is not used for precise data such as currency or research data. can have a 7-digit decimal precision

**Double** - The double data type is similar to float. The difference between the two is that is double twice the float in the case of decimal precision. It is used for decimal values just like float and can be used for precise values. can have a 15-digit decimal precision.

Non-Primitive Data Types:

The Non-Primitive (Reference) Data Types will contain a memory address of variable values because the reference types won’t store the variable value directly in memory. They are strings, objects, arrays, etc.
Unlike primitive data types we define by Java, non-primitive data types are user-defined. Programmers create them and can be assigned with null. All non-primitive data types are of equal size.

**String** - The String data type stores a sequence or array of characters. A string is a non-primitive data type, but it is predefined in Java.

Please refer my previous vlog of datatypes in java for better understanding.