Java – if statement

Among the decision making statements, if- statement is the most simple one.It checks if the condition is true or not, and if it is true then it executes the block of code inside if otherwise, it will not. The block that is executed is placed within the curly braces({}).