class Test3
{
private String name;
private int age;
private String sex;
void Test3(String name,int age,String sex)
{
this.name=name;
this.age=age;
this.sex=sex;
}
void print()
{
System.out.println(name);
System.out.println(age);
System.out.println(sex);
}
public static void main(String[] args)
{
Test3 t3 = new Test3("zhangsan",20,"男");
t3.print();
}
}
提示参数长度不对,啊啊啊啊啊,不知道哪里错了,求知道
|
|