Curly bracket programming language
Appearance
{{subst:#ifeq:a|b||{{subst:#ifexist:Wikipedia:Articles for deletion/{{subst:PAGENAME}}|{{subst:lessthan}}!-- The nomination page for this article already existed when this tag was added. If this was because the article had been nominated for deletion before, and you wish to renominate it, please replace "page={{subst:PAGENAME}}" with "page={{subst:PAGENAME}} (2nd nomination)" below before proceeding with the nomination.
-->}}}}This template must be substituted. Replace {{afd
with {{subst:afd
.
{{subst:lessthan}}!-- Once discussion is closed, please place on talk page:
![]() | This article was nominated for deletion on {{subst:#time:j F Y|{{subst:CURRENTTIMESTAMP}} }}. The result of the discussion was keep. |
-->
This is a brief overview of the syntax of Java.
Control structures
Loops
while (Boolean expression) { statement(s) }
do { statement(s) } while (Boolean expression);
for (initialisation ; termination condition ; incrementing expr) { statement(s) }
Conditional statements
if (Boolean expression) { statement(s) }
if (Boolean expression) { statement(s) } else { statement(s) }
With else if arbitrarily complex if-then-constructions may be built.
if (Boolean expression) { statement(s) } else if (Boolean expression) { statement(s) } else if (Boolean expression) { statement(s) } else { statement(s) }
switch (integer expression) { case constant integer expr: statement(s) break; ... default: statement(s) break; }
Exception handling
try { statement(s) } catch (exception type) { statement(s) } catch (exception type) { statement(s) } finally { statement(s) }