ref: 85bd13fb2d589a45d9d8b4ff256bead3d2a46215
parent: dd82d34b0fb7572f9525ba52642cc460ba9cf4f6
author: mkf <mkf@d510>
date: Mon May 15 02:51:05 EDT 2023
check input
--- a/Main.java
+++ b/Main.java
@@ -259,12 +259,18 @@
public void getInput()
{
int in;
- boolean flag = true;
+ boolean t = true, flag = true;
Scanner s = new Scanner(System.in);
while(flag)
{
System.out.print("menu> ");
+ while(!s.hasNextInt())
+ {
+ System.out.println("Please enter a valid input");
+ s.nextLine();
+ }
in = s.nextInt();
+
switch(in)
{
/* XXX