Design Pattern: Command Pattern in Java

Command pattern is used to encapsulate/wrap a command in an object so that the object can be sent as a parameter and can be used in other places. This article demonstrates Command pattern implementations in Java. Check the following examples.

Design Pattern: Command Pattern

Command pattern wraps a request/command in an object. Then we can pass the object anywhere and later when we want to execute the command the object can be used.