Command Design Pattern

This is kind of Behavioral Design Pattern(BDP) and as per the BDP definition, “Behavioral patterns describe how the objects behave when they interact with each other” and as the name explain this design pattern is used when we give command to some one else to get our job done.

Example: When you visit any restaurant, you place an order to waiter not to cook and its not your job get the final order on your table. Its waiter’s job.

Another example of this design pattern is all implementations of java.lang.Runnable

Hope this clears you doubt!!

One thought on “Command Design Pattern

Comments are closed.