Builder is extremely useful to pair with a parser, e.g. SAX. The parser parses the input, and the builder then decides what to do with it.
Let’s remove the category argument and you get this:
Post post = new Post.Builder() .title("Java Builder Pattern") .text("Explaining how to implement the Builder Pattern in Java") .build();
Post post = new Post("Java Builder Pattern", "Explaining how to implement the Builder Pattern in Java", null);
Post post = new Post(title: "Java Builder Pattern", text: "Explaining how to implement the Builder Pattern in Java");
Builder is extremely useful to pair with a parser, e.g. SAX. The parser parses the input, and the builder then decides what to do with it.