I have a question regarding the creation of objects in using method chaining with StringBuilders. BB&KS book has the following code example:
I can see how the StringBuilder's value gets updated every time. But the chained method invocations each return a StringBuilder object. Is it true that in the process of method chaining, intermediate objects are created? They are not assigned to a reference variable, but they are created and can be considered lost, is that right?