[5293] in java-interest
Re: [Q] (Promblematic) Lack of enum in Java
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Mon Feb 5 15:06:08 1996
Date: Mon, 5 Feb 1996 09:45:42 -0800
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: grege@optimation.com.au
Cc: java-interest@java.Eng.Sun.COM
Hi Greg,
> Why not do something like this if you want enum-like constants:
>
> class ParseStatus {
>
> public static final ParseStatus STATEA = new ParseStatus();
> public static final ParseStatus STATEB = new ParseStatus();
> public static final ParseStatus STATEC = new ParseStatus();
> }
That is cool, but expensive, and you can't use them in switch
statements.
PS: I've been trying to get enums in for a long time but I've
failed. We can't seem to agree on the correct way of doing it.
Have fun,
Arthur van Hoff
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com