Java Factory Pattern

  • + 0 comments

    return order.equals("cake") ? new Cake() : new Pizza();