From 04421c3a90e93c15f25021a58870d9debe9d4e0a Mon Sep 17 00:00:00 2001 From: t-eguchi <26-t-eguchi-tmn@it-college.co.jp> Date: Mon, 14 Sep 2026 15:22:18 +0900 Subject: [PATCH] =?UTF-8?q?=E6=AE=B5=E9=9A=8E=EF=BC=92=E7=B5=82=E3=82=8F?= =?UTF-8?q?=E3=82=8A=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- em-oop/src/BasicCheck2.java | 10 ++++++++++ em-oop/src/Student.java | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 em-oop/src/BasicCheck2.java create mode 100644 em-oop/src/Student.java diff --git a/em-oop/src/BasicCheck2.java b/em-oop/src/BasicCheck2.java new file mode 100644 index 0000000..3b5dbbc --- /dev/null +++ b/em-oop/src/BasicCheck2.java @@ -0,0 +1,10 @@ + +public class BasicCheck2 { + public static void main(String[] args) { + Student student = new Student(); + student.studentId = 1; + student.name = "鈴木一郎"; + student.printProfile(); + } + +} \ No newline at end of file diff --git a/em-oop/src/Student.java b/em-oop/src/Student.java new file mode 100644 index 0000000..436c2f0 --- /dev/null +++ b/em-oop/src/Student.java @@ -0,0 +1,11 @@ + +public class Student { + int studentId; + String name; + + public void printProfile () { + System.out.println("学籍番号:" + this.studentId + " 名前 " + this.name); + + } + +}