3日目 段階7 小澤
This commit is contained in:
@@ -36,9 +36,18 @@ public class Main {
|
||||
dept.setNmDepartment("営業企画部");
|
||||
allData[10]=dept;
|
||||
|
||||
int emp=0;
|
||||
int dep=0;
|
||||
for(int i=0;i<allData.length;i++) {
|
||||
System.out.println(allData[i]);
|
||||
if(allData[i] instanceof EmployeeData) {
|
||||
emp++;
|
||||
}
|
||||
if(allData[i] instanceof DepartmentData) {
|
||||
dep++;
|
||||
}
|
||||
}
|
||||
System.out.println("社員データ:"+emp+"件");
|
||||
System.out.println("部署データ:"+dep+"件");
|
||||
|
||||
|
||||
// employees[0] = new EmployeeData("10000", "山田龍也", "ヤマダタツヤ", "yamada@hoge.jp", "aaa", "10");
|
||||
|
||||
Reference in New Issue
Block a user