From 28076595d2e2636b34d343dd621e12d667223e24 Mon Sep 17 00:00:00 2001 From: m_ozawa <26-m-ozawa-swnet@it-college.co.jp> Date: Mon, 14 Sep 2026 15:09:56 +0900 Subject: [PATCH] =?UTF-8?q?0914=E3=80=80=E6=AE=B5=E9=9A=8E=EF=BC=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- em-oop/src/BasicCheck2.java | 12 ++++++++++++ em-oop/src/Student.java | 11 +++++++++++ 2 files changed, 23 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..e90d1a6 --- /dev/null +++ b/em-oop/src/BasicCheck2.java @@ -0,0 +1,12 @@ + +public class BasicCheck2 { + public static void main(String[] args) { + Student student = new Student(); + + student.studentId = 1; + student.name = "鈴木一郎"; + + student.printProfile(); + } + +} diff --git a/em-oop/src/Student.java b/em-oop/src/Student.java new file mode 100644 index 0000000..a668753 --- /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); + + } + +}