3日目の7段階目終了
This commit is contained in:
@@ -23,11 +23,20 @@ public class Main {
|
||||
allData[9] = new DepartmentData("14", "教育事業部");
|
||||
allData[10] = new DepartmentData("15", "営業企画部");
|
||||
|
||||
int count = 0;
|
||||
int countt = 0;
|
||||
for (int i = 0; i < allData.length; i++) {
|
||||
if (allData[i] instanceof EmployeeData) {
|
||||
count++;
|
||||
|
||||
System.out.println(allData[i]);
|
||||
|
||||
} else if (allData[i] instanceof DepartmentData) {
|
||||
countt++;
|
||||
}
|
||||
}
|
||||
System.out.println("社員のデータ:" + count + "件");
|
||||
System.out.println("部署のデータ:" + countt + "件");
|
||||
|
||||
// System.out.println(allData[i]);
|
||||
|
||||
// employees[0] = new EmployeeData("10000", "山田龍也", "ヤマダタツヤ", "yamada@hoge.jp", "aaa", "10");
|
||||
// employees[1] = new EmployeeData("10001", "高橋準", "タカハシジュン", "jtaka@hoge.jp", "bbb", "10");
|
||||
|
||||
Reference in New Issue
Block a user