mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 08:14:13 +00:00
updated flyweight sample
This commit is contained in:
1 parent
db4625b9fe
commit
f42c340598
7 files changed
+26
-18
No files matched your search
@@ -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