段階2
This commit is contained in:
@@ -9,6 +9,7 @@ public class BasicCheck2 {
|
|||||||
// System.out.print("学籍番号"+student.studentId);
|
// System.out.print("学籍番号"+student.studentId);
|
||||||
// System.out.print("名前:" + student.name);
|
// System.out.print("名前:" + student.name);
|
||||||
student.printProfile();
|
student.printProfile();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,17 @@ public class Student {
|
|||||||
public Student(int studentId, String name) {
|
public Student(int studentId, String name) {
|
||||||
this.studentId = studentId;
|
this.studentId = studentId;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printProfile() {
|
public void printProfile() {
|
||||||
System.out.println("学籍番号:" + this.studentId + " 名前:" + this.name);
|
System.out.println("学籍番号:" + this.studentId + " 名前:" + this.name);
|
||||||
}
|
}
|
||||||
public static void main(String[] args) {
|
//public static void main(String[] args) {
|
||||||
Student s = new Student(1,"鈴木一郎");
|
//Student s = new Student(1,"鈴木一郎");
|
||||||
s.printProfile();
|
//s.printProfile();
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user