Sync Factory Method, Abstract Factory, Builder, Prototype to Java 25; fix post/code mismatches
This commit is contained in:
9
01-creational/factory-method/SlackSender.java
Normal file
9
01-creational/factory-method/SlackSender.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package factorymethod;
|
||||
|
||||
// New Concrete Creator — knows to create a SlackNotification
|
||||
public class SlackSender extends NotificationSender {
|
||||
@Override
|
||||
protected Notification createNotification() {
|
||||
return new SlackNotification();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user