posted 17 years ago
Answer:343 341 340
This is from chapter:3, example:9, page no:270 from K & B book.
Book describe " There are three different long variables named tooth. Remember that you can apply the final modifier to local variables, but in this case the 2 versions of tooth marked final are not changed. The only tooth whose value changes is the one not marked final. This program demonstrates a bad practice known as shadowing."
I think both instance & local variable are final. You cannot change any of them. Book says "you can change which is not marked final".
I am not getting which variable is not final?
Can anyone please explain?