Day1、5段階目完了

This commit is contained in:
m-endo
2026-09-17 13:38:24 +09:00
parent 922e9cb829
commit bec44823e1
2 changed files with 17 additions and 10 deletions

View File

@@ -7,4 +7,10 @@ public class EmployeeData {
String mailAddress;//メールアドレス String mailAddress;//メールアドレス
String password;//パスワード String password;//パスワード
String idDepartment;//部署ID String idDepartment;//部署ID
//メソッド追加
void showInfo() {
System.out.println(this.idEmployee + "\t" + this.nmEmployee + "\t" + this.knEmployee + "\t" + this.mailAddress
+ "\t" + this.password + "\t" + this.idDepartment);
}
} }

View File

@@ -13,12 +13,13 @@ public class Main {
employee.password = "aaa"; employee.password = "aaa";
employee.idDepartment = "10"; employee.idDepartment = "10";
//各フィールド出力 //各フィールド出力
System.out.println(employee.idEmployee); //System.out.println(employee.idEmployee);
System.out.println(employee.nmEmployee); //System.out.println(employee.nmEmployee);
System.out.println(employee.knEmployee); //System.out.println(employee.knEmployee);
System.out.println(employee.mailAddress); //System.out.println(employee.mailAddress);
System.out.println(employee.password); //System.out.println(employee.password);
System.out.println(employee.idDepartment); //System.out.println(employee.idDepartment);
employee.showInfo();
} }
} }