Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

if-else

java



+ Font mai mare | - Font mai mic



if-else

The if-else statement is probably the most basic way to control program flow. The else is optional, so you can use if in two forms:



if(Boolean-expression statement

or

if(Boolean-expression statement
else
statement

The conditional must produce a Boolean result. The statement means either a simple statement terminated by a semicolon or a compound statement, which is a group of simple statements enclosed in braces. Anytime the word "statement" is used, it always implies that the statement can be simple or compound.

As an example of if-else, here is a test( ) method that will tell you whether a guess is above, below, or equivalent to a target number:

static int test(int testval)

It is conventional to indent the body of a control flow statement so the reader might easily determine where it begins and ends.




Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 630
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved