BAEL 7138 Difference between String and StringBuffer in Java (#15351)
* string vs stringBuffer comparison * BAEL-7138 Difference between String and StringBuffer in Java --------- Co-authored-by: Sahil <sahilsriv05@gmail.com>
This commit is contained in:
parent
cf858a1493
commit
d935c4fe23
|
@ -28,6 +28,7 @@ public class ComparePerformance {
|
|||
|
||||
@Benchmark
|
||||
public String benchmarkStringConcatenation() {
|
||||
strFinal = "";
|
||||
strFinal += strInitial;
|
||||
return strFinal;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue