相关代码 |
|
class person//类 { String name; int age; person(String a,int b)//构造函数 { name = a; age = b; } } public class ResumeDemo { public static void main(String[] aa) { person chen = new person("chen Hui",50); System.out.println("name= "+chen.name); System.out.println("age= "+chen.age); } }