Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #36389

Re: array class names

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: array class names
Date 2017-03-05 19:41 -0500
Organization Aioe.org NNTP Server
Message-ID <o9ib7k$1pof$2@gioia.aioe.org> (permalink)
References <o9i72h$ppc$1@Gaia.teknon.de> <o9ib1j$1pof$1@gioia.aioe.org>

Show all headers | View raw


On 3/5/2017 7:38 PM, Arne Vajhøj wrote:
> On 3/5/2017 6:30 PM, Volker Borchert wrote:
>> Does anybody out there know why long[] is called "[J" and Object[]
>> is called "[Ljava.lang.Object;" rather than the more obvious "[L"
>> and "[Ojava.lang.Object;" (or maybe "[Rjava.lang.Object;" if 'O'
>> is too similar a zero)?
>
> It is documented what they are:
>
> https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.3.2-200
>
>
> But you are asking about why these letters were chosen.
>
> That probably require someone working for SUN back in the mid 90's
> to answer.

BTW, you are not the only one wondering:

http://stackoverflow.com/questions/14882998/in-java-serialisation-why-does-j-signify-a-long-and-l-signify-an-object

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

array class names v_borchert@despammed.com (Volker Borchert) - 2017-03-05 23:30 +0000
  Re: array class names Arne Vajhøj <arne@vajhoej.dk> - 2017-03-05 19:38 -0500
    Re: array class names Arne Vajhøj <arne@vajhoej.dk> - 2017-03-05 19:41 -0500
      Re: array class names "Tristan B. Kildaire" <deavmi@disroot.org> - 2017-03-22 19:30 +0200
        Re: array class names lewbloch@gmail.com - 2017-03-23 15:46 -0700

csiph-web