Jen Q.

asked • 06/26/17

Trouble with a code segment in Java

 
What's wrong with the following code segment?

final double TAX_RATE = 0.08;

TAX_RATE = 0.0875;
 
This question is confusing. When I copy this into my Java IDE, it can't compile and i'm left with an error "Cannot assign value to final variable TAX_RATE"

Tim C.

tutor
I would recommend looking up what a "final" variable means in Java.
Report

06/26/17

1 Expert Answer

By:

Valerie T. answered • 09/14/17

Tutor
5.0 (100)

Software Engineer Gone Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.