Java variables are used to reserve memory locations to store values. It means when you create a variable you reserve some space in memory. Space allocation depend upon data type of a variable and operating system allocates memory and decide what to be store in reserved memory. Java introduced two data type’s. Primitive data types