class A
{
private int i;
private int j;
public void set(int a,int b)
{
i = a;
j = b;
}
public A()
{
// System.out.printf("%d\n"+"无参函数调用了");
System.out.printf("无参函数调用了");
}
public void show()
{
System.out.printf("%d %d\n",i,j);
}
}
class testConst
{
public static void main(String[] args)
{
A aa = new A();
aa.show();
}
}
为什么无参函数调用了前面加"%d\n"+会报错哪,只能把"%d\n"+去掉哪。