Currently I\'m reading \"Java concurrency in practice\", which contains this sentence:
Since the action of a thread accessing a stateless object can\'
In simple terms state of object means value of internal variables in that object.
Stateful - state of object can be changed, means internal values off member variables of that object can be changed
How values can be changed?
By setting the value.
When can you set that value? When the variable is not final..
So, to make the class stateless, make the variable final, so that the value of that variable can't be changed neither in setter not in another method. It can be used only for computing.