I can't really answer what they want, but a few comments:
(1) Since usually only gives a constructor with the builder class as an argument, one forces the creation via the builder. The constructor itself is public. You could theoretically also create further constructors without the builder class, but often this is not useful because you want to check admissible attribute combinations in the builder() of the builder.
2) In principle, this replaces the named parameters in other programming languages by having a "speaking" representation instead of a long constructor with many positional parameters. This will certainly also help to avoid errors when you write new Foo(1,2,3) then new Foo.builder().setX(1).setY(2).setZ(3). Therefore, I would say yes. It makes sense especially if you have optional parameters, where you need either many constructors or a pretty cramp object in Java.
3) Difficult. For new functionality, you don't have to change the constructor, you just need to add new attributes when creating the class. If you need new attributes, this is easier to change with a builder than the constructor, however, the new attributes are mandatory, here you push the exam from the creation time to the running time, which may make it worse. One no longer looks at the interface of a class which attributes must be set.
4) I would cross. Lake (2). And you can also check the set attributes in the builder and throw an exception with invalid combination.
If you build Setters of the class without Builder so that you can return the object so that you can set the attributes indicated at 2) in succession, this unfortunately has the disadvantage that this is not thread-safe and possibly brings unpredictable effects.
I can't really answer what they want, but a few comments:
(1) Since usually only gives a constructor with the builder class as an argument, one forces the creation via the builder. The constructor itself is public. You could theoretically also create further constructors without the builder class, but often this is not useful because you want to check admissible attribute combinations in the builder() of the builder.
2) In principle, this replaces the named parameters in other programming languages by having a "speaking" representation instead of a long constructor with many positional parameters. This will certainly also help to avoid errors when you write new Foo(1,2,3) then new Foo.builder().setX(1).setY(2).setZ(3). Therefore, I would say yes. It makes sense especially if you have optional parameters, where you need either many constructors or a pretty cramp object in Java.
3) Difficult. For new functionality, you don't have to change the constructor, you just need to add new attributes when creating the class. If you need new attributes, this is easier to change with a builder than the constructor, however, the new attributes are mandatory, here you push the exam from the creation time to the running time, which may make it worse. One no longer looks at the interface of a class which attributes must be set.
4) I would cross. Lake (2). And you can also check the set attributes in the builder and throw an exception with invalid combination.
If you build Setters of the class without Builder so that you can return the object so that you can set the attributes indicated at 2) in succession, this unfortunately has the disadvantage that this is not thread-safe and possibly brings unpredictable effects.