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