What is Stateless Object in Java?

前端 未结 10 1445
猫巷女王i
猫巷女王i 2020-11-30 21:32

Currently I\'m reading \"Java concurrency in practice\", which contains this sentence:

Since the action of a thread accessing a stateless object can\'

10条回答
  •  执念已碎
    2020-11-30 21:51

    The concept of stateless object is highly coupled with concept of side effects. Shortly, that is the object that has no fields underneath which could have different values, dependently on different order of method calls.

提交回复
热议问题