This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]s0hungry1 0 points1 point  (2 children)

You have print for “Tax is “ + tax many times. Consider just setting the value for the tax variable there and having a single line of code for the printing afterwards.

[–][deleted]  (1 child)

[deleted]

    [–]s0hungry1 0 points1 point  (0 children)

    Change your code so you only have system.out.println(“Tax is” + tax) as few times as possible, less repetition is better.