62,614
社区成员
发帖
与我相关
我的任务
分享
public String(String original) {
int size = original.count;
char[] originalValue = original.value;
A string literal is a reference to an instance of class String (§4.3.1, §4.3.3).
int a = 4;
Integer b = new Integer(4);
String c = "dddd";
String d = new String("ddd");
public class Test4 {
private int num;
public int c;
public Test4(Test4 o){
this.c = o.num;
}
public Test4(){
num = 6;
}
}
Test4 b = new Test4();
Test4 f = new Test4(b);
private final char value[];
private final int offset;
private final int count;
private int hash;
既然是String的属性,又是在当前类里面,就可以直接用了