Free Version
Moderate

# Is There An Error?

APCSA-JT4GET

Consider the following code segment.

final double INCOME_TAX_PERCENT = 7.60; // 7.60%
int income = // assume that a valid income has been assigned;

if (income > 25000)
INCOME_TAX_PERCENT = INCOME_TAX_PERCENT +.01;
double incomeTax = income * INCOME_TAX_PERCENT / 100;
System.out.println(incomeTax);


Assume that the income tax calculation is a straight-forward calculation of income times the income tax percentage.

Which of the following describes why this code will not correctly print the income tax?

A

There is nothing wrong with this code.

B

The calculation of incomeTax should not be divided by 100.

C

The value initially assigned to INCOME_TAX_PERCENT cannot be changed.

D

incomeTax should be declared as an integer, not a double.

E

incomeTax cannot be printed since it is not a string.