package pkg;
import java.util.Scanner;
public class Shopping {
public static void main(String[] args) {
boolean isRight = true;
System.out.println("欢迎使用Myshopping管理系统");
System.out.println();
System.out
.println("*******************************************************");
Scanner keyin = new Scanner(System.in);
System.out.println("请选择,输入数字:");
do {
int i = keyin.nextInt();
if (isRight == (i > 0 && i <= 4)) {
switch (i) {
case 1:
System.out.println("客户信息管理");
break;
case 2:
System.out.println("购物结算");
break;
case 3:
System.out.println("真情回馈");
break;
case 4:
System.out.println("真情回馈");
break;
default:
break;
}
continue;
} else {
System.out.println("输入错误,请从新输入:");
continue;
}
} while (true);
// System.out.println("************************************************************");
}
}
.....这个试试看
温馨提示:内容为网友见解,仅供参考