In object-oriented programming, a category of objects. The class defines the common properties, operations, and behaviors of different objects that belong to it. For example, a class called shape might contain objects that are circles, rectangles, and triangles. A class can be regarded as a template definition of the methods and variables in a particular kind of object. A class with subclasses, which inherit all or some of its characteristics, is also known as a superclass. The structure of a class and its subclasses is called a class hierarchy.