Java provides a rich set of data types. Every variable declared or defined has a particular
data type. The assigned data type specifies the size and the type of values that a variable can
store. Java provides a number of data types which have their particular significant in decid-
ing the appropriate type by the programmer while programming.
There are mainly two basic types of data types:
Primitive data types
Primitive data types are also known as built-In data types. These data types are predefined
by the language. Java provides the following primitive data types in Java :
8 bit signed in-
Rang e is -128 to
where memory significantly matters.
Integer Data type are 32 bit signed integer
Default value is zero.
16 bit signed integer