Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Grant Young   on Oct 10 In Java Category.

  
Question Answered By: Brandi Ramirez   on Oct 10

You are right that the java  compiler will do this job for you.
But this no reason for me why you shouldn't do it yourself.
Anyway.....
The compiler will instantiate a new StringBuffer everytime you use the "+".
You can see it when you run applications that are written in this manner
using "+" and watch the memory consumption.
This is explained in very details in "Java essentials" from sun. A book that
I can
recommend for every java developer.

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem in Fetching Values Or get search suggestion and latest updates.


Tagged: