The object referenced by the final variable can still be manipulated unless the object the variable references is immutable.
[OCP 21 Professional Study Guide] [OCP 17 Complete Study Guide] [OCP 17 Practice Tests] [OCP 11 Complete Study Guide] [OCP 11 Programmer I] [OCP 11 Programmer II] [OCP 11 Practice Tests] [OCA 8] [OCP 8] [OCP 8 Practice Tests Book] [Blog]
"I'm not back." - Bill Harding, Twister
The trick, for beginners especially, is to keep in mind that final means completely different things when applied to primitives, objects ...
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Jim Yingst:
[Rathi]: If an instance variable of servlet is final int i = 9; then it's not thread safe, I agree...
It certainly is thread safe. Why wouldn't it be? Final primitives are thread safe, and final references to immutable reference types are thread safe.
If two threads are changing (modifying) or can change something simultaneously then it is not thread safe.