Java Collection集合练习——创建学生对象的集合,存储学生对象,遍历该集合打印输出

package com.peihua.cn.test1.Test; public class Student { private String name; private int age; private String Xxingbie; public Student() { } public Student(String name, int age, String xxingbie) { this.name = name; this.age = age; Xxingbie = xxingbie; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getXxingbie() { return Xxingbie; } public void setXxingbie(String xxingbie) { Xxingbie = xxingbie; } }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zwxggz.html