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 Cserves 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.



 

Corky Cartwright
1999-09-07