
Appendix B
j-- Language
B.1 Introduction
j-- is a subset of Java and is the language that our example compiler translates to JVM
code. It has a little less than half the syntax of Java. It has classes; it has ints, booleans,
chars, and Strings; and it has many Java operators. The ‘j’ is in the name because j-- is
derived from Java; the ‘--’ is there because j-- has less functionality than does Java. The
exercises in the text involve adding to this language. We add fragments of Java that are not
already in j--.
B.2 j-- Program and Its Class Declarations
A j-- program looks very much like a Java program. It can have an optional package state-
ment, follow ...