content « StringBuffer « Java Data Type Q&A

1. Java : Clearing StringBuffer contents

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

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 ...