日期:2014-05-20 浏览次数:20634 次
public String(String original) { int size = original.count; char[] originalValue = original.value; char[] v; if (originalValue.length > size) { // The array representing the String is bigger than the new // String itself. Perhaps this constructor is being called // in order to trim the baggage, so make a copy of the array. v = new char[size]; System.arraycopy(originalValue, original.offset, v, 0, size); } else { // The array representing the String is the same // size as the String, so no point in making a copy. v = originalValue; } this.offset = 0; this.count = size; this.value = v; }
String(int offset, int count, char value[]) { this.value = value; this.offset = offset; this.count = count; }
------解决方案--------------------
嗯 估计是大企鹅把count和value弄混了...很少看见大企鹅提问啊...
------解决方案--------------------
正在努力学习中。。。
帮顶了。。。