A field may be either of primitive or reference type . There are eight primitive types: boolean , byte , short , int , long , char , float , and double . A reference type is anything that is a direct or indirect subclass of java. … The syntax for the type name is described in Class. getName() .