When i am using the null character 'u0000'
, stringbuilder will stop appending new elements.
For example:
StringBuilder _stringBuilder = new StringBuilder();
_stringBuilder.append('u0000');
_stringBuilder.append('a');
System.out.println("."+_stringBuilder+".");
returns
.
I understand that the null value should not be printed (or printed like if it was a null String value) but in this case, why does stringbuilder is failing to add more elements ?
Note: I am using jdk 1.6.0_38 on ubuntu.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…