public class A {
private int a;
private char b;
private float c;
public static void main (String[] args) {
A A1=new A();
System.out.println("a is "+A1.a);
System.out.println("c is "+A1.c);
System.out.println("b is "+A1.b);
}
}
这样的打印结果为 a is 0
c is 0
b is
public class A {
private int a;
private char b;
private float c;
public static void main (String[] args) {
A A1=new A();
System.out.println("a is "+A1.a);
System.out.println("b is "+A1.b);
System.out.println("c is "+A1.c);
}
}
而这样的打印结果为 a is 0
b is
后面的竟然没有打印为什么?
[求助]关于char的初始化