段階2終わりました

This commit is contained in:
2026-09-14 15:22:18 +09:00
parent d694f1f22f
commit 04421c3a90
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
public class BasicCheck2 {
public static void main(String[] args) {
Student student = new Student();
student.studentId = 1;
student.name = "鈴木一郎";
student.printProfile();
}
}

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

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