Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class DecoratorSample {
public static void main(String[] args) {
Coffee coffee = new Coffee();
coffee = new Milk(coffee); // ラップ
System.out.println(coffee.price()); // 360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment