Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>There is no working <code>goto</code> in Java</strong></p> <p>Even though the Java keyword list <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html" rel="nofollow">specifies the goto keyword</a>, it is marked as <em>not used</em>. Hence, it cannot work. You have to rewrite your code without using the <code>goto</code> keyword.</p> <p>A general hint: there are <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.7" rel="nofollow">Labeled Statements</a></p> <blockquote> <p>Statements may have label prefixes.</p> <pre><code>LabeledStatement: Identifier : Statement LabeledStatementNoShortIf: Identifier : StatementNoShortIf </code></pre> <p>The Identifier is declared to be the label of the immediately contained Statement.</p> <p>Unlike C and C++, the Java programming language has no goto statement; identifier statement labels are used with <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.15" rel="nofollow">break (§14.15)</a> or <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.16" rel="nofollow">continue (§14.16)</a> statements appearing anywhere within the labeled statement.</p> <p>The scope of a label of a labeled statement is the immediately contained Statement. – JLS (§14.7)</p> </blockquote> <p>But what you really want, is to rewrite your constructs without using that, for instance by using <code>while</code></p> <pre><code>while (f == 0) { // ... } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload