Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: How to convert image into Hex 2 Dimensional Array? Date: Wed, 08 May 2013 23:18:36 -0400 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <41718873-b1a6-4b97-bbbb-8002c48d4e29@googlegroups.com> <518af634$0$32105$14726298@news.sunsite.dk> <518b02f9$0$32109$14726298@news.sunsite.dk> <518b040c$0$32109$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, 9 May 2013 03:15:06 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="12021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19T5fk2d3evP+PEt15o6Fip" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <518b040c$0$32109$14726298@news.sunsite.dk> Cancel-Lock: sha1:6iWcbFzb5KK7TF4cLJLzPAQOeds= Xref: csiph.com comp.lang.java.programmer:23958 On 5/8/2013 10:03 PM, Arne Vajhøj wrote: >[...] >> I would still expect the byte version to end up >> with width*height Byte objects. >> >> If there are no null and no reused objects, then >> I can not see how that can be avoided. > > Are you saying that Java will intern so aggressively > that there will be reused objects? JLS, section 5.1.7: "If the value p being boxed is true, false, a byte, or a char in the range \u0000 to \u007f, or an int or short number between -128 and 127 (inclusive), then let r1 and r2 be the results of any two boxing conversions of p. It is always the case that r1 == r2." -- Eric Sosman esosman@comcast-dot-net.invalid