Day1、5段階目完了
This commit is contained in:
@@ -7,4 +7,10 @@ public class EmployeeData {
|
||||
String mailAddress;//メールアドレス
|
||||
String password;//パスワード
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,18 +7,19 @@ public class Main {
|
||||
EmployeeData employee = new EmployeeData();
|
||||
//各フィールド代入
|
||||
employee.idEmployee = "10000";
|
||||
employee.nmEmployee ="山田龍也";
|
||||
employee.knEmployee ="ヤマダタツヤ";
|
||||
employee.nmEmployee = "山田龍也";
|
||||
employee.knEmployee = "ヤマダタツヤ";
|
||||
employee.mailAddress = "yamada@hoge.jp";
|
||||
employee.password= "aaa";
|
||||
employee.idDepartment="10";
|
||||
employee.password = "aaa";
|
||||
employee.idDepartment = "10";
|
||||
//各フィールド出力
|
||||
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);
|
||||
//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);
|
||||
employee.showInfo();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user