Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Arrays in java Date: Mon, 09 Jul 2012 09:17:06 -0700 Organization: A noiseless patient Spider Lines: 12 Message-ID: References: <7eb3b37e-612a-4f51-98e5-f39cfd565739@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 9 Jul 2012 16:17:07 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="YSgq+NZZXo2ZHttawD1uAA"; logging-data="25016"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180q/0kL8IjDB7D1bA0OqE2mTv10ROB7X0=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <7eb3b37e-612a-4f51-98e5-f39cfd565739@googlegroups.com> Cancel-Lock: sha1:gnw579efpdXmYlq82+F7uuiEeTs= Xref: csiph.com comp.lang.java.programmer:15897 On 7/9/2012 7:54 AM, mmc.java wrote: > I am just starting to learn java and wanted to know when creating an > array if there is any reason why you choose one of the following over > the others or if it is just a styling choice by the developer It's "style choice" but there a convention too, most of the code I've seen uses the style below. For readability, I'd recommend it. (Readability = it's what everyone is used to seeing.) > int[] productIDs = {10,20,30};