文章目录 定义 get set 打印输出 package LXT; public class zuoye2 { public static void main(String[] args) { Student s1 = new Student(); s1.setName("老邓"); s1.setAge(18); s1.setGender("男"); s1.setEnglish(100); s1.setMath(99); s1.setChinese(98); s1.study(); s1.sum(); s1.