12 lines
289 B
Java
12 lines
289 B
Java
package learn.simple_strategy;
|
|
|
|
public class Main {
|
|
public static void main(String[] args) {
|
|
Context context = new Context(new ConcreteStrategyB());
|
|
|
|
context.doSomeJob();
|
|
context.setCurrentStrategy(new ConcreteStrategyA());
|
|
context.doSomeJob();
|
|
}
|
|
}
|