Data definitions appear in the classes as attribute declarations. Similar data definitions appear within the functions (or methods); these are known as local data declarations. There are two general types of data definitions:
Declarations of simple variables
Declarations of object variables, also known as object references
Simple variables are those of simple or primitive types; these store small and simple data items like integer values, floating-point values, and others. Object variables (or object references) are variables that can store the reference to objects when they are created. The only way to manipulate objects is by using their references, because in Java and KJP objects do not have an identifier directly associated with them.