title: reasons for array type encoding in Class.getName()
body: <p>Array type encoding from the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getName--" rel="nofollow noreferrer">API documentation</a>:</p>
  
  <pre><code>boolean             Z
  byte                B
  char                C
  class or interface  Lclassname;
  double              D
  float               F
  int                 I
  long                J
  short               S 
  </code></pre>
  
  <p>It seems counterintuitive to introduce <code>J</code> for <code>long</code>, instead of keeping <code>L</code> for <code>long</code> and using <code>T</code> for reference <strong>t</strong>ypes. I was unable to find a solid explanation of this encoding decision.</p>
  
  <p>To clarify, the Java Language Specification sometimes has comments on syntax features influenced by other languages and similar "external" reasons. I'm looking for that kind of explanation. For instance, my guess for <code>Z</code> is that it is a reference to <code>0</code>/<code>!0</code> check in C.</p>
  
  <p>This <a href="https://stackoverflow.com/a/5085907">answer</a> points to the <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.3.2" rel="nofollow noreferrer">JVM specification</a>, but the explanation for <code>J</code>, <code>L</code> and <code>Z</code> is still out there.</p>