Em 13-10-2015 11:35, Nils Chr. Brause escreveu:
In C++ the order doesn't matter either, since each entry has a defined value. I wonder why this is different in Java?
Java Enums doesn't have "value". It just a class instance. But since it's a class one can add regular fields to it, like this (writing of the top of my head):
public static enum Orientation { Portrait(1), Landscape(2); final int value; Orientation(int value) { this.value = value; } public int getValue() { return this.value; } } Solerman _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel