Members

Delegation Pattern and The By Keyword

The delegation pattern is a technique where an object expresses a certain behavior to the outside but simultaneously delegates responsibility for implementing that behavior to an associated object.

Let's understand this with the help of an example:
Let's say we want a printer. And a printer does what it is supposed to do. Let's create an interface to show this behavior.

interface Printer {
void print(final String message);
}

https://erpsolutions.oodles.io/developer-blogs/Delegation-Pattern-a...

Views: 2

Comment

You need to be a member of On Feet Nation to add comments!

Join On Feet Nation

© 2024   Created by PH the vintage.   Powered by

Badges  |  Report an Issue  |  Terms of Service