News

The Java enum is a powerful feature of the language that allows one to elegantly represent finite values and to provide convenient access to characteristics of those finite values.
Because Java lacks a proper C/C++ enumeration (enum) feature, Java programmers have opted to define simple sets of primitive values: public class Colors { public static final int GREEN = 0; ...
I picked up adding a few meta values to enums a long time ago; I feel they make bounds checking and writing for loops more readable. But gcc has been giving me some grief about it in one way, here ...