That factory code you mentioned isn&#x27;t _just_ a Java thing, but a very well-known and wonderful design pattern.<p>Wikipedia says it best: &quot;[The] Factory pattern deals with the instantiation of object without exposing the instantiation logic.&quot;<p>Practical benefits:<p>- Can help rid of excessive switch and if&#x2F;elseif statements and splits up your logic<p>- Eliminates new keyword to improve testability