updated flyweight sample
This commit is contained in:
@@ -4,7 +4,7 @@ public class HealingPotion implements Potion {
|
||||
|
||||
@Override
|
||||
public void drink() {
|
||||
System.out.println("You feel healed.");
|
||||
System.out.println("You feel healed. (Potion=" + System.identityHashCode(this) + ")");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user