一日目段階9完了しました
This commit is contained in:
@@ -19,19 +19,22 @@ public class Main {
|
|||||||
//
|
//
|
||||||
// System.out.println(employee[0].toCSV());
|
// System.out.println(employee[0].toCSV());
|
||||||
// System.out.println(employee[0].getPrimaryKeyValue());
|
// System.out.println(employee[0].getPrimaryKeyValue());
|
||||||
System.out.println("検索したい社員IDを入力してください");
|
String str="";
|
||||||
|
while(!str.equals("0")){
|
||||||
|
System.out.println("検索したい社員IDを入力してください(終了する場合は0)");
|
||||||
Scanner sc = new Scanner(System.in);
|
Scanner sc = new Scanner(System.in);
|
||||||
String str = sc.nextLine();
|
str = sc.nextLine();
|
||||||
for (int i = 0; i <= 4; i++) {
|
for (int i = 0; i <= 4; i++) {
|
||||||
boolean bo = employee[i].isMatchId(str);
|
boolean bo = employee[i].isMatchId(str);
|
||||||
if (bo == true) {
|
if (bo == true) {
|
||||||
System.out.println(employee[i]);
|
System.out.println(employee[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (bo == false && i == 4) {
|
if (bo == false && i == 4 && !str.equals("0")) {
|
||||||
System.out.println("該当する社員が見つかりませんでした");
|
System.out.println("該当する社員が見つかりませんでした");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
System.out.println("システムを終了します");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user