If-else Statement in java, odd or even ?

Java Programming Language Decision Making in java (Article) Decision Making in java (Program)

6429

Program:

 public class IfElseExample {
public static void main(String[] args)
{
    int number=13;
    if(number%2==0)
    {
        System.out.println("even number");
    }
    else
    {
        System.out.println("odd number");
    }
 }
}

Output:

odd number
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.