There are 2 type of datatype-
Primitive Data Type
Reference Data Type also know as Object Data Type or Non-Primitive
Primitive Data Type-
byte-8 bit,and integer type,default value is 0.
short-is integer type and takes 2 bytes,default value is 0.
int-is integer type and takes 4 bytes,default value is 0.
long-is integer type and takes 8 bytes,default value is 0L.
float-is decimal type value,single precision and takes 4 bytes,default value is 0.0f
char-can store any character and takes 2 bytes,default value is 'u0000'.
double-is decimal type value,double precision and takes 8 bytes,default value is '0.0d'.
boolean-It takes one bytes and can store either of two values;True or False,default value is FALSE.
Primitive data type are those whose variable allows us to store only one value but they never allows us to store multiple value of same type.This is a datatype whose variable can hold maximum one value at a time
Non-Primitive Data type-They are basically defined as derived data types.They are directly or indirectly dependent on primitive data types.The method for storing non-primitive datatype is different from primitive data type.They store the values with reference to the addresses or locations.So,they are also called 'Reference Data type'.
All java component require names.Name used for classes ,method,interface and variable also called identifier.
Identifier follow some rule's which are listed below-