Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Java Programming/Keywords/else

From Wikibooks, open books for an open world
<Java Programming |Keywords

else is a Java keyword. It is an optional part of a branching statement. It starts the 'false' statement block.

The general syntax of aif, usingExtended Backus-Naur Form, is

branching-statement ::=ifcondition-clausesingle-statement |block-statement                       [elsesingle-statement |block-statement ] condition-clause    ::=( Boolean Expression)single-statement    ::=Statementblock-statement     ::={Statement [Statement ]}

For example:

Computer code
if(expression){System.out.println("'True' statement block");}else{System.out.println("'False' statement block");}


See also:

Retrieved from "https://en.wikibooks.org/w/index.php?title=Java_Programming/Keywords/else&oldid=3241552"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp