FreeBASIC <-> Java | Conditional statement

FreeBASIC

if then end if, if then else end if

Description

if condition then
statements1
end if
if condition then
statements1
else
statements2
end if
Used keywords: if else then end

Input

Examples

FreeBASIC

Conditional statement the possible of use:
if i > 10 then
i =10
            i = i - 1
   i=i+1
end if
if i < 10 then
 i = 10
 else
 i=1
end if
.
Java

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;
Languages: en hu cz sk