段階2完了しました。

This commit is contained in:
2026-09-14 15:02:58 +09:00
parent 73c8facacd
commit 73723669c5
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
public class BasicCheck2 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Student student = new Student();
student.studentId = 1;
student.name = "鈴木一郎";
student.printProfile();
}
}

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);
}
}