package Hanqi.ec; import java.util.Scanner; public class zuoyekehushuru { public static void main(String[] args) { System.out.println("请输入一个数字:"); try{ Scanner b=new Scanner(System.in); int a =b.nextInt(); } catch(Exception ee) { System.out.println("请您输入正确的数字"); } } }