2段階目(自分でクラスを宣言してみよう)

This commit is contained in:
s-sakiyama
2026-09-14 16:32:12 +09:00
parent 25802b8380
commit 04da447bfe
2 changed files with 21 additions and 0 deletions

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

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