next up previous
Next: Defining Classes to Represent Up: From Scheme to Java Previous: Object Types


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 2004-02-05