2日目段階2~4です

This commit is contained in:
2026-09-18 11:34:35 +09:00
parent 90ac263e9c
commit b6f3df93ed
6 changed files with 222 additions and 92 deletions

View File

@@ -3,12 +3,24 @@ public class BasicCheck2 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Student student = new Student ();
student.studentId = 1;
student.name = "鈴木一郎";
student.printProfile();
Student student1 = new Student(1, "鈴木一郎");
// student1.studentId = 1;
// student1.name = "鈴木一郎";
student1.printProfile();
Student student2 = new Student(2, "田中花子");
student2.printProfile();
Student student3 = new Student(3, "佐藤次郎");
student3.printProfile();
Student.getStudentCount();{
System.out.println("現在の生徒数:" + Student.studentCount + "人");
}
}
}