1. Consider the following if statement:
if (x > 2)
{
if (y > 2)
z = x + y;
System.out.println("z is " + z);
}
else
System.out.println("x is " + x);
What is displayed if the values of x and y are, respectively,
a. 3 and 2.
b. 2 and 2.
c. 3 and 4.
2. Write a multiway if statement to decide the percentage increase of an employee’s salary based on the following merit rating scale:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here