Java - conditional statement: if, if else

by conditions we can control our program. thanks conditional statement we can control program running in two directions. if the condition is satisfied to continue running the program in a first direction, if not as the second direction. under the directions of the programme I think either statement or block of statements.

if, if else

Description

if (condition) statement1
if (condition) statement1 else statement2
Used keywords: if else

Input

Examples

Java

conditional statement the possible of use:
if (i > 10)
{
i =10;            i = i - 1;   i++;
}
if (i < 10) i = 10; else i=1;

Java

Other pieces of example codes:
while (i>0)
   if (i==10)
     break;
   else 
   {
     i--;
   }
if (i==16)
 {
    continue;
 }
 
if ( y < 100 )  
   x++;
if (x > 0) // x == true
   x=5;
if (i==5)
    break;
if (i - 10 >0) i = i-5;
Languages: en hu cz sk