Hi, > > Especially if it is a substring of another string: in that case the array > > is larger > than string.length(). > > This was actually changed recently (and in j8) so no backing char[] array > sharing is present anymore -- substring is copy-based.
This is already the case in Java 7. Java 6 string layout is: - final char[] value - final int offset, length Java 7 string layout is: - final char[] value - no more offset and length! --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
