This commit is contained in:
2026-10-20 16:38:29 +09:00
parent 6a268bdb79
commit 64d90f1da5
30 changed files with 713 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
public class Student {
int studentId;
String name;
public void printProfile() {
System.out.println("学籍番号:" + this.studentId + " 名前:" + this.name);
}
public Student(int studentId, String name) {
this.studentId = studentId;
this.name = name;
studentCount++;
}
static int studentCount = 0;
public static int getStudentCount() {
return studentCount;
}
}