会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
演绎、白色舞步
博客园
首页
新随笔
联系
订阅
管理
2020年4月26日
Java对于Scanner输入数据格式不正确的异常处理
摘要: 1 Scanner scanner = new Scanner(System.in); 2 int score = 0; 3 while(!scanner.hasNextInt()) { 4 System.out.println("输入的类型不正确,请重新输入:"); 5 //作用是将上面输入的那个
阅读全文
posted @ 2020-04-26 16:05 演绎、白色舞步
阅读(960)
评论(0)
推荐(0)
编辑
公告