Type a chained StringBuilder append
Type a chained StringBuilder append
Answer
sb.append("row ").append(i).append('\n');
append returns the same StringBuilder, so calls chain. It mutates the buffer in place — no new objects per step.
Type a chained StringBuilder append
Type a chained StringBuilder append
Answer
sb.append("row ").append(i).append('\n');
append returns the same StringBuilder, so calls chain. It mutates the buffer in place — no new objects per step.