Java - Conditional Statement if, if...else, elseif

Java provides the traditional conditional statements like if, if...else..., elseif - The if statement allows the conditional execution. Whenever the primary if statement expression gets failed, it will try to execute the consecutive elseif block statment or the else block statement.