next up previous
Next: 1.5.1 Defining Classes to Up: 1. From Scheme to Previous: 1.4.2 Object Types


1.5 Java Class Definitions

In Scheme, new forms of data are defined by the define-struct construct. A define-struct expression defines a template for creating instances of the specified structure. 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 or modify) C. The precise differences between the Scheme define-struct and the Java class constructs are explained below.



Subsections

Corky Cartwright 2002-08-09