Determine the output

Report a typo

What does the following code print if the variable a is 2?

if (a <= 0) {

    if(a == 0) {
        System.out.print("1 ");
    }
    else { 
        System.out.print("2 ");
    }
}
System.out.print("3 ");
Select one option from the list
___

Create a free account to access the full topic