Scanner中nextLine()方法失效

当调用Scanner中的nextInt()方法后不能直接调用nextLine()方法否则nextLine()方法会失效

 

 

 而调用Scanner中的nextInt()方法后调用其他方法否则不会失效

 

 

 

 

posted @ 2022-08-12 14:50  hefuhao  阅读(58)  评论(0)    收藏  举报