相关代码 |
|
class Person { String name; int age; Person(String a,int b) { name=a; age=b; } } public class ResumeDemo { public static void main(String args[ ]) { Person sun=new Person("孙亮",21); System.out.println("姓名:"+sun.name); System.out.println("年龄:"+sun.age); } }
相关资源 |
|