上传了实验三,已确认无敏感信息

This commit is contained in:
2024-06-10 16:39:18 +08:00
parent f1190f2c2f
commit 5191778415
13 changed files with 234 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
//Student.java
package test1;
public class Student {
int id;
int age;
int grade;
public void study() {
System.err.println("学号为" + id + "的学生正在学习");
}
public void examination() {
System.err.println(id + "年级正在考试");
}
public void tell() {
System.out.print("正在讲话的是一个" + age + "岁的学生");
}
}
+14
View File
@@ -0,0 +1,14 @@
//test.java
package test1;
public class test {
public static void main(String[] args) {
Student s1 = new Student();
s1.id = 001;
s1.age = 18;
s1.grade = 1;
s1.study();
s1.examination();
s1.tell();
}
}