Operators

If Statement in Java: Explained

1/4

Given:

class Test {
    public static void main(String[] args) {
        int x = 4;

        if (x == 3) {
            System.out.print("3");
        } else {
            if (x < 3) {
                System.out.print("<3");
            } else {
                System.out.print(">3");
            }
        }
    }
}

What is the result?

Comments