+ 1
Is place holder method superior to string concatenation?
https://code.sololearn.com/c9ujU3q303Ws/?ref=app And would String interpolation have any advantages? Or just another way to accomplish same thing? https://code.sololearn.com/cIN9uYY8N20j/?ref=app
1 ответ
+ 1
The difference between the two is minor.
However a string is immutable. If you change a string, a new one is created. This makes the second method in favor.
But as I said in this example, it will be hard to prove or notice the difference.