This slide shows a typical class definition in Java. The Java language does not have enumerated data types, so the class begins with a series of definitions for constant values that we will use as symbolic constants. These are declared static and final, meaning there is only one copy, and they will be defined once.
Data fields have been declared private, as in the C++ version.
Other features are very similar to the C++ example.