Java If else
If statement is used to execute a block of statements if the specified condition is true. Syntax: if(condition){ //Block of statements. } Program to use if statement in Java. public class IFExample { public static void main(String args[]){ int num1 = 10; int num2 = 20; if(num1 < num2){ //Print num1 if num1 < num2. … Read more