| Main Page |
The C/C++ style enum class is a new feature to Java.
To be able to compile programs using enum you need to have
Java 1.5 (Java 2, Standard Edition 5.0) installed. The Linux machines in the
CS cluster and the Mac machines in the MacLab all have Java 1.5 installed.
I will say a bit more about installing on your home computer
below. You must tell Eclipse that you want to use
Java 1.5 to compile your programs. This page explains how.
enum class
The new Java C/C++ style
enum class for creating constants is quite a powerful addition.
(To see an alternative way of creating constant objects in Java, compatible
with pre-Java 1.5, see the discussion of enum in
Thinking in Java.)
Creating an enum class in a project is easy in Eclipse:
enum class Wizzard
enum class
You must have Java 1.5 installed to continue this section (see below for more details.)
Java 1.5 (Java 2, Standard Edition 5.0) is installed on all Linux machines in the CS cluster and the Mac machines in the MacLab. Java 1.5 can be obtained from the Sun site (for Window machines) or at the Apple site. (I believe Java 1.5 is only available for OS X.4, Tiger. Java 1.4.2 is the default version on the Mac.)
| Main Page |