package a; import java.util.*; public class YiChang { public static void main(String[] args) { System.out.println("输入整数:"); try { Scanner a=new Scanner(System.in); int b=a.nextInt(); } catch (Exception e) { e.printStackTrace(); System.out.println("输入有误!"+e.getMessage()); } } }
转载于:https://www.cnblogs.com/wenwen123/p/5535692.html