Scanner输入时next()和nextLine()可能会发生的错误
摘要:
当 scanner 的 nextXXX() 方法触发了 InputMismatchException 异常,输入的值会保留,直到你调用了 scanner 的 nextXXX() 或next()方法 public class Test1 { public static void main(String 阅读全文
posted @ 2022-01-11 11:48 HSpringX 阅读(171) 评论(0) 推荐(0) 编辑