Java: Allowed statements after labels : <p>I'm playing around with Java Syntax, so this is question arises purely from curiosity. This piece of code:</p>

<pre><code>http://www.google.com
Object val = 5 &lt;- 4;
</code></pre>

<p>does <strong>not</strong> compile, because a label (<code>http</code>) "must be followed by a statement". The following two variants do compile:</p>

<pre><code>http://www.google.com
{ Object val = 5 &lt;- 4; }
</code></pre>

<p>and </p>

<pre><code>Object val;
http://www.google.com
val = 5 &lt;- 4;
</code></pre>

<p>In both cases, I switched from a declaration to an expression.
This makes me wonder what exactly is a "statement" in Java, but the <a href="https://docs.oracle.com/javase/tutorial/java/nutsandbolts/expressions.html" rel="noreferrer">doc</a>
states:</p>

<blockquote>
  <p>In addition to expression statements, there are two other kinds of statements: declaration statements and control flow statements. A declaration statement declares a variable.</p>
</blockquote>

<p>The <a href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.7" rel="noreferrer">JLS</a> just says (on labels) that </p>

<blockquote>
  <p>The Identifier is declared to be the label of the immediately contained Statement. </p>
</blockquote>

<p>It does not say anything about "expression statements".</p>

<p>Did I miss something, or is this just an unclear/incorrect specification?</p>
