可能是一个菜鸟问题,但为什么这段代码打印为空?
public class Bug1 {
private String s;
public void Bug1() {
s = "hello";
}
public String toString() {
return s;
}
public static void main(String[] args) {
Bug1 x = new Bug1();
System.out.println(x);
}
}