next up previous
Next: 1.4.1 Defining New Forms Up: 1. From Scheme to Previous: 1.3.7 Java Types and

1.4 Java Classes and Objects

In Scheme, new forms of data are defined by the def-struct construct. A def-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 serves as a template for creating instances of the class. The differences between the Scheme def-struct and the Java class constructs are best explained by giving an example.



 

Robert Cartwright, Spring 1999