Whizlabs Support ([email protected] or +91-9971838640 )
OCAJP 8 | OCPJP 8 | OCEJWCD | OCMJEA

"Eppur si muove!"
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Adding on to a StringBuffer is [also] quite a bit faster than the + operator, which creates a new StringBuffer itself, appends both of the arguments, and converts the result back to a String
"I'm not back." - Bill Harding, Twister
Originally posted by Ilja Preuss:
Can you show us the benchmark code?
Also, what JDK did you run this on? This might heavily affect performance differences.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
| With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |