In this tutorial we will discuss about various ways to write if else condition with basic example.

If Statement Syntax :

if (condition){
    code to be executed if condition is true;
}

Sample Code :