You are viewing a single comment's thread. Return to all comments →
switch (order){ case "pizza": return new Pizza(); case "cake" : return new Cake(); default : return null; }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Factory Pattern
You are viewing a single comment's thread. Return to all comments →