Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Tuesday, January 8, 2013

Time taken by various string concatenation methods

As the title goes, the objective of the folowing program will be to find out the time difference or performance various string concatenation methods:

i) + operator
ii) String class' concat() method
iii) StringBuffer class' append() method
iv) StringBuilder class' append() method

The program is followed by results in nanoseconds.