package com.pp;
public class PersonDemo {
public static void main(String[] args) {
Person p = new Person();
p.speak();
}
}
public class Person {
private int age;
private String name;
private String sex;
public void speak(){
this.age=20;
this.name="zhangsan";
this.sex="男";
System.out.println("名字是"+this.name+",年龄是"+this.age+"性别是"+"\t"+this.sex);
}
}