All Courses
If Then Statement in Java Language

if then Statement in Java

May 2nd, 2019 Java

if then Statement in Java

Syntax:

if (expression)
{
……;
}

Description :

If the expression evaluates to true, the block of statements will be executed.

Example:

if (5>3)
{
System.out.println(“Will be printed”);
}

Output:

Will be printed
Social Share:

0 responses on "if then Statement in Java"

Leave a Message

Your email address will not be published. Required fields are marked *