Back To Java Flow of Control Index
//program to demonstrate if-else statement example 2 , check whether number is greater than 10 or not public class ifelseexample2 { public static void main(String[] args) { int a; a=11; if(a>10) { System.out.println("a is greater than 10"); } else { System.out.println("a is either less than 10 or equal to 10"); } } }