There are different data types in java. Different data types have different amounts of memory allocated to them. The image below delves into some examples:
Image credits: https://www.javatpoint.com/java-data-types
We will be going into more detail in the pages for Primitive and Non-primitive data type