🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8730

Re: enum

#8730
From: Tor Iver Wilhelmsen
Date: Fri, 09 Mar 2001 14:57
20 lines
1192 bytes
"Bob Vasseur" <vasseura@mscomm.com> writes:

> It would appear that there is no Java equivalent to an enum in C. is this
> true?

No. But apart from "type safety" (if you mean C++), try using static
final ints for the purpose.

(The IDL to Java mapping has an alternative typesafe but more
voluminous approach; if you want that, try writing e.g.

module myPackage {

  enum colour { red, green, blue };

}

in an IDL file, and compile it using idlj.

)
Technical Details
Message-ID: <uofvbxa5s.fsf@sds.no>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!206.252.192.28!news.stealth.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
References: <3aa8e395_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,64ea3a233c496641
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-09 07:06:16 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!206.252.192.28!news.stealth.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: enum
Date: 09 Mar 2001 15:57:19 +0100
Organization: Another Netscape Collabra Server User
Lines: 20
Sender: towi@SDSA1761
Message-ID: <uofvbxa5s.fsf@sds.no>
References: <3aa8e395_1@dnews>
NNTP-Posting-Host: pc4-252.sds.no
X-Newsreader: Gnus v5.5/Emacs 20.3