Skip to main content

empty string

1 reply [Last post]
Joined: 2004-11-07

Does anyone knows what would be the effect on memory/runtime to have private someString = "" variables declared in various classes in a project ?
Would it be better to have one static final EMPTY_STRING somewhere (in StringUtil) to assign there instead ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-01-07

This empty Strings are automatically interned, so no need to worry about them.

lg Clemens