1日目4段階目が完了しました。

This commit is contained in:
s-ohasi
2026-09-18 10:05:43 +09:00
parent e28c819868
commit 2492cc0631
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
public class EmployeeData {
String idEmployee;
String nmEmployee;
String knEmployee;
String mailAddress;
String password;
String idDepartment;
}

29
em-oop/src/Main.java Normal file
View File

@@ -0,0 +1,29 @@
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
//型、変数宣言しインスタンス化
EmployeeData employee = new EmployeeData();
//フィールドに代入
employee.idEmployee = "10000";
employee.nmEmployee = "山田龍也";
employee.knEmployee = "ヤマダタツヤ";
employee.mailAddress = "yamada@hoge.jp";
employee.password = "aaa";
employee.idDepartment = "10";
//6つのフィールド出力
System.out.println(employee.idEmployee);
System.out.println(employee.nmEmployee);
System.out.println(employee.knEmployee);
System.out.println(employee.mailAddress);
System.out.println(employee.password);
System.out.println(employee.idDepartment);
}
}