把test.java救回来了

This commit is contained in:
2024-06-11 01:53:01 +08:00
parent d085000064
commit d753356d40
54 changed files with 1309 additions and 1297 deletions
+21 -21
View File
@@ -1,21 +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 + "岁的学生");
}
}
//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 -14
View File
@@ -1,14 +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();
}
}
//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();
}
}