段階2です。

This commit is contained in:
2026-09-14 15:21:51 +09:00
parent e7f0dfff43
commit 910a102d72
3 changed files with 26 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ public class BasicCheck1 {
System.out.println(book.title);
System.out.println(book.author);
System.out.println(book.price);
}
}

View File

@@ -0,0 +1,14 @@
public class BasicCheck2 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
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;
void printProfile() {
System.out.println("学籍番号:" + this.studentId + " 名前:"+ this.name);
}
}