Relates :
|
In an average heap dump, 292 kB is wasted from empty Strings having their own char[] of length 0. Instead, the String class should declare a zero-length char[] and use that for empty Strings. The constructor should detect that an empty String is being created and use the common char[].
|