Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Using Enumerated Types as Array Indexes Date: Wed, 17 Aug 2011 19:51:38 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <4e4b0d81$0$314$14726298@news.sunsite.dk> <4e4b1fe4$0$314$14726298@news.sunsite.dk> <4e4c6c1b$0$308$14726298@news.sunsite.dk> <4e4c6efe$0$308$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 18 Aug 2011 02:51:47 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="10421"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ZPVT8AgHnu+HRTsSkgC4SIu7rxLuQFk0=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 In-Reply-To: <4e4c6efe$0$308$14726298@news.sunsite.dk> Cancel-Lock: sha1:03MQBoX99QHnRALrnGGApWwSLZ8= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7194 On 8/17/2011 6:46 PM, Arne Vajhøj wrote: > an it should have been: > > # In Java array indexes are > # int and you have byte/short/int/long integer types and that is it. OK, you still left char out. char is an integer type. And I personally don't feel that long is correct -- it's an integer type but it has potential loss of precision. Normally you should use int, since that has all the precision you will need. That's all I'm saying.