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(); }}
添加回答
举报
0/150
提交
取消