Skip to content

Commit da902a1

Browse files
committed
Fixed State
1 parent 4198141 commit da902a1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/BehavioralPatterns/StateDP/Main.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
public class Main {
44
public static void main(String[] args){
55
Phone stateContext = new Phone();
6-
stateContext.alert();
7-
stateContext.alert();
6+
stateContext.alert(); // -> "vibration..."
87
stateContext.setState(new Silent());
9-
stateContext.alert();
10-
stateContext.alert();
11-
stateContext.alert();
8+
stateContext.alert(); // -> "silent..."
129
}
1310
}

0 commit comments

Comments
 (0)