class Person
{
String name;
String sex;
int age;
void eat()
{
System.out.print("姓名是"+name+"的性别为"+sex+"的年龄为"+age+"的人说 :");
System.out.println(" 我要吃饭!");
}
}
public class aa
{
public static void main(String []args)
{
Person ye=new Person();
ye.name="叶强";
ye.sex="男";
ye.age=24;
ye.eat();
}
}