added template method sample
This commit is contained in:
12
template-method/src/main/java/com/iluwatar/App.java
Normal file
12
template-method/src/main/java/com/iluwatar/App.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
HalflingThief thief = new HalflingThief(new HitAndRunMethod());
|
||||
thief.steal();
|
||||
thief.changeMethod(new SubtleMethod());
|
||||
thief.steal();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user