Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Gail Knight   on Jun 14 In Java Category.

  
Question Answered By: Geneva Morris   on Jun 14

The concat method is creating a new String object, which wastes memory. By
using a StringBuffer and the append method, you save it from creating (and
eventually destroying) an object. It may not seem like much, but do it a couple
hundred times a second and the wasted cycles will start to pile up.

Share: 

 

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

 
Didn't find what you were looking for? Find more on String Object Or get search suggestion and latest updates.


Tagged: