Scala, Design Patterns, Programming, Builder Pattern, Coding.
implementation of the companion object. object PersonBuilder { def apply() = new PersonBuilder } It has an apply method, which it’s a syntactic sugar and makes available for the client to call the apply method instead of using PersonBuilder.apply(), using PersonBuilder(). This approach it’s