段階2完了いたしました。

This commit is contained in:
2026-09-14 16:36:18 +09:00
parent 43567c0e0c
commit 7559a7dfa7
3 changed files with 37 additions and 0 deletions

22
em-oop/src/Student.java Normal file
View File

@@ -0,0 +1,22 @@
public class Student {
int studentId;
String name;
public Student(int studentId, String name) {
this.studentId = studentId;
this.name = name;
}
public void printProfile() {
System.out.println("学籍番号:" + this.studentId + " 名前:" + this.name);
}
public static void main(String[] args) {
Student s = new Student(1,"鈴木一郎");
s.printProfile();
}
}