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

1.4 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
2000-01-07