The following example demonstrates concatenating strings through the "+" operator and the StringBuffer.append() method, and compares their performance:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
The output result of the above code example is:
1 2 |
|
The above is the content of the Java example-connection string. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!