mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 16:58:56 +00:00
updated flyweight sample
This commit is contained in:
@@ -4,7 +4,7 @@ public class StrengthPotion implements Potion {
|
||||
|
||||
@Override
|
||||
public void drink() {
|
||||
System.out.println("You feel strong.");
|
||||
System.out.println("You feel strong. (Potion=" + System.identityHashCode(this) + ")");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user