Java Reference
In-Depth Information
Figure 6-9.
Again, the programmer must determine if the processing was correct. Because the taxSal value of 500 is correct,
we will step to the next statement.
5.
Click the “step over” button.
Notice that the condition in line 65 was evaluated and the current statement is now line 68. This means that the
condition in line 65 was false and processing proceeded to the else clause. This is just as we expected.
6.
Click the “step over” button.
Again the condition was false, and processing proceeded to the else clause, just as we expected.
7.
Click the “step over” button.
This time the condition is true, so the taxAmount calculation should be performed. Once again, this is exactly
as expected.
8.
Click the “step over” button.
The calculation is performed (as expected) but the value (489.50) is incorrect (see Figure 6-10 ). We have found
the culprit! Take a closer look at the calculation and try to figure out what is wrong.
 
Search WWH ::




Custom Search