The class keyword is used in the declaration of a new class. A class declaration defines a new reference type (or object) and describes its implementation through the use of constructors, methods, and fields. These implementation details can be inherited from superclasses, or uniquely defined as part of the class declaration.