1日目4段階目が完了しました。
This commit is contained in:
9
em-oop/src/EmployeeData.java
Normal file
9
em-oop/src/EmployeeData.java
Normal 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
29
em-oop/src/Main.java
Normal 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);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user