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);
	}
}
原文:http://www.cnblogs.com/zhv5/p/6062951.html