package textdemo;
class Tc {
String name;
int age;
public void tell(){
System.out.println("姓名:"+name+",年纪:"+age);
}
}
public class tc{
public static void main (String args[]){
Tc per1 = new Tc ();
per1.name = "张三";
per1.age = 10;
per1.tell();
}
}
KXFT
相关分类