while문 안에서 Scanner 입력 오류로 안해 무한 루프가 발생했다... 기존 코드InputMismatchException 발생되면, catch (Exception e) 에서 잡힌다.하지만, 버퍼가 비워지지 않아 continue -> InputMismatchException -> continue -> ... 무한 굴레에 빠지게 되었다.while(true){ try { num1 = sc.nextInt(); // 문자열 입력 시 InputMismatchException 발생 ! num2 = sc.nextInt(); sc.nextLine(); // 버퍼 비우기 ... } catch (Exception e) { System.out.pr..