package lianxi;
public class gouzao
{
public static void main(String []args)
{
Person p=new Person();
}
}
class Person
{
private int age;
private String name;
Person()
{
System.out.println("run");
}
Person(String n)
{
name=n;
System.out.println(name);
}
Person(int a,String n)
{
name=n;
age=a;
System.out.printf(age,name);//这句为什么报错
}
}
|
|