Question 1 of 10
A clerk tries to print a bonus. Which statement about this code is true?
int n = 4;
if (n > 0)
{
int bonus = 2;
}
System.out.print(bonus);
- A. The program displays 2
- B. The program displays 0
- C. The program does not compile because bonus exists only in the if block
- D. The program displays 4