JAVA个人信息

class Person
{
String name;
String sex;
int age;
String birthday;
}

class demo1
{
public static void main(String[] args)
{
Person zh = new Person();
zh.name ="张恒";
zh.sex="男";
zh.age=21;
zh.birthday="1996年1月2日";

System.out.println("个人信息:"+"姓名:"+zh.name+" "+"性别:"+zh.sex+" "+"年龄:"+zh.age+"岁 "+"生日:"+zh.birthday);

}
}

posted @ 2016-11-14 18:45  张恒v5  阅读(354)  评论(0编辑  收藏  举报