Special Offer - Enroll Now and Get 2 Course at ₹25000/- Only Explore Now!

All Courses
if then Statement in Java

if then Statement in Java

May 2nd, 2019

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