intermediateBehavioral Patterns (Java)
Strategy pattern vs State pattern — both swap behavior at runtime, so what actually distinguishes them?
Tests whether you know Strategy is chosen externally by the client, while State transitions are driven internally by the object itself.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
Strategy pattern vs State pattern — both swap behavior at runtime, so what actually distinguishes them?