把test.java救回来了
This commit is contained in:
+21
-21
@@ -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
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user