-
Notifications
You must be signed in to change notification settings - Fork 983
Closed
Description
Can you describe the benefits of using String.format instead of creating string with '+' sign?
As I understand, appending strings with '+' should be much faster because it will be compiled to StringBuilder operations, when String.format should at first parse string (for '%s', '%d' etc.) and only after that insert all parameters into proper places.
Also '+' is simpler, when String.format can be cause of problem during making changes (you must sure that all specifiers have right types (%d, %s) and all parameters are in proper places)
Also it's often simpler to read code with '+', (just my opinion)
kaciula
Metadata
Metadata
Assignees
Labels
No labels