// simple concatenation final String greeting = "Happy" + " " + "birthday.";
JavaC does concatenation of String literals, such as in the example above, at compile time, so they have no run-time overhead.
JavaC implements concatenation with calls to StringBuffer in JDK (Java Development Kit) 1.4- and StringBuildder in 1.5+. These are not as efficient as using StringBuilder directly since there is no way to specify the size of the buffer.
Rem glue a.txt, b.txt and c.txt into a new file d.txt Rem leaving a.txt, b.txt and c.txt as they were. copy a.txt + b.txt + c.txt d.txtcopy /A warns copy that the files might have EOL characters.
Take Command does not support these options. It presumes text files do not use obsolete EOL characters.
It is safe to append onto your target like this:
However|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/concatenation.html | J:\mindprod\jgloss\concatenation.html | |
![]() | Please email your feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording,
broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.213] | |
| Feedback | You are visitor number 11. | |