
public class DecisionConstruct {

	public static void main(String[] args) {

		int x = 5;

		// if statement
		if (x == 5) {
			System.out.println("x is 5");
		}

		// if-else statement
		if (x == 5) {
			System.out.println("x is 5");
		} else {
			System.out.println("x is " + x);
		}

		// if-else if-else statement
		if (x < 5) {
			System.out.println("x is less than 5");
		} else if (x > 5) {
			System.out.println("x is greater than 5");
		} else {
			System.out.println("x is " + x);
		}

		// nested if
		if (x < 5) {
			if (x < 0) {
				System.out.println("x is a negative value: " + x);
			} else {
				System.out.println("x is a positive value: " + x);
			}
		}
	}

}
