From 507bb0797a7e0f52e4c6e2d4b14bda7729721a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A6=AE=E3=80=80=E9=AD=AF=E6=81=92?= <26-r-fu-successplan@it-college.co.jp> Date: Fri, 23 Oct 2026 16:34:44 +0900 Subject: [PATCH] =?UTF-8?q?2=E6=97=A5=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/rhizome/example/main/Main.java | 47 +++----------------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/src/com/rhizome/example/main/Main.java b/src/com/rhizome/example/main/Main.java index ca028c9..06a35ef 100644 --- a/src/com/rhizome/example/main/Main.java +++ b/src/com/rhizome/example/main/Main.java @@ -23,9 +23,7 @@ public class Main { public static void main(String[] args) { System.out.println("システムを開始します"); Main main = new Main(); - while (true) { - - + while (true) { try { main.start(); } catch (Exception e) { @@ -56,32 +54,28 @@ public class Main { start1(); }else { start2(); - } - + } break; case "2": //登録 if(employeeMode) { empInsert(); }else { depInsert(); - } - + } break; case "3": //更新 if(employeeMode) { empUpdate(); }else { depUpdate(); - } - + } break; case "4": //削除 if(employeeMode) { empDelete(); }else { depDelete(); - } - + } break; case "9": //データ切り替え employeeMode = !employeeMode; @@ -387,37 +381,6 @@ public class Main { System.out.println("削除が完了しました"); } - /** - * 入力値を判定し、返却する - * - * @param titleName 入力項目名 - * @param flg 数値チェック可否フラグ - * @return チェック済み入力値 - */ -/* public static String inputCheck(String titleName, boolean flg) { - String str = null; - while (true) { - System.out.println(titleName + "を入力してください"); - str = sc.nextLine(); - if (str.trim().length() == 0) { - System.out.println(titleName + "は入力必須です。"); - continue; - } - if (flg) { - if (str.trim().length() > 0) { - try { - Integer.parseInt(str); - } catch (NumberFormatException e) { - System.out.println(titleName + "は数値入力です"); - continue; - } - } - } - break; - } - return str; - } -*/ public void DepSelectAll()throws FileNotFoundException{ DepartmentAccess da = new DepartmentAccess();