The Context object delegates state-specific behavior to different State objects. First, Context calls handle(this) on its current (initial) state object (ConcreteStateA), which performs the operation and calls setState(ConcreteStateB) on Context to change context's current state to ConcreteStateB. The next time, Context again calls handle(this) on its current state object (ConcreteStateB), which performs the operation and changes context's current state to ConcreteStateA.
the context object delegates state-specific behavior to different state objects first context calls handle(this) on its current (initial) state object (concretestatea) which performs the operation and calls setstate(concretestateb) on context to change context's current state to concretestateb the next time context again calls handle(this) on its current state object (concretestateb) which performs the operation and changes context's current state to concretestatea