public class Person{
private String name ;
pirvate Integer age;
private String sex;
public Person(String name,Integer age,String sex){
this.name=name;
this.age=age;
this.sex=sex;
}
public void say(){
System.out.println("斗稿我悔散叫“+name+" "+sex+" 年龄:"+age");
}
public void eat(){
System.out.println("我爱吃水果");
}
}
public class Test{
public void static main(String[] args){
Person p = new Person("空前孝xxx",20,"男”):
p.say();
p.eat();
}
}