content « StringBuffer « Java Data Type Q&A





1. Java : Clearing StringBuffer contents    stackoverflow.com

All, I was wondering if clearing a StringBuffer contents using the setLength(0) would make sense. i.e. Is it better to do :

while (<some condition>)
{
    stringBufferVariable = new StringBuffer(128);
  ...

2. StringBuffer contents are not    forums.oracle.com

Here is the jsp call to javabean: Here is the java code public StringBuffer processedHouseList; public void zeroizeHouseList(){ processedHouseList = null; processedHouseList = new StringBuffer(); } Message was edited ...