#StringBuffer default constructor confusion

5 messages · Page 1 of 1 (latest)

warped lodge
#

I'm trying to write a default constructor, and one of the variables needed has to be a StringBuffer or StringBuilder. What is the default/empty value of a StringBuffer?

This is likely rooted in a fundamental misunderstanding of StringBuffer entirely, so if it's something obviously wrong, don't be afraid to call me a dumbass.

Thanks in advance.

#

StringBuffer default constructor confusion

jade trout
#

try a new StringBuffer()

warped lodge
jade trout
#

No? That's just a coding style, it's upto you to use it or not.
That won't affect compilation