In Java, new forms of data are defined by the class construct. A class C serves as a template for creating instances of the class and as a basis for defining new classes that extend (enlarge) C.