Question 1
Analyze the following code:
int x = 0;
if (x > 0);
{
| System.out.println("x"); |
}
◦ The symbol x is always printed.
◦ Nothing is printed because x > 0 is false.
◦ The symbol x is always printed twice.
◦ The value of variable x is always printed.
Question 2
What is x after evaluating the following?
x = (2 > 3) ? 2 : 3;
◦ 5
◦ 3
◦ 4
◦ 2