What is Stateless Object in Java?
问题 Currently I'm reading "Java concurrency in practice", which contains this sentence: Since the action of a thread accessing a stateless object can't affect the correctness of operations on other threads, stateless objects are thread-safe. So, what is stateless object? 回答1: Stateless object is an instance of a class without instance fields (instance variables). The class may have fields, but they are compile-time constants (static final). A very much related term is immutable . Immutable