From 04da447bfe479a6e9698fe92cc1d178c7c7c6cee Mon Sep 17 00:00:00 2001 From: s-sakiyama <26-m-s-stella-tecnica@it-college.jp> Date: Mon, 14 Sep 2026 16:32:12 +0900 Subject: [PATCH] =?UTF-8?q?2=E6=AE=B5=E9=9A=8E=E7=9B=AE=EF=BC=88=E8=87=AA?= =?UTF-8?q?=E5=88=86=E3=81=A7=E3=82=AF=E3=83=A9=E3=82=B9=E3=82=92=E5=AE=A3?= =?UTF-8?q?=E8=A8=80=E3=81=97=E3=81=A6=E3=81=BF=E3=82=88=E3=81=86=EF=BC=89?= 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 | 9 +++++++++ 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..7c81880 --- /dev/null +++ b/em-oop/src/BasicCheck2.java @@ -0,0 +1,12 @@ + +public class BasicCheck2 { + + public static void main(String[] args) { + // TODO 自動生成されたメソッド・スタブ + 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..9f90905 --- /dev/null +++ b/em-oop/src/Student.java @@ -0,0 +1,9 @@ + +public class Student { + int studentId; + String name; + + void printProfile() { + System.out.println("学籍番号:" + this.studentId + " 名前:" + this.name); + } +}