Scanner类中的:next() 和 nextLine()方法解析

Scanner类中的:next() 和 nextLine()方法解析

1、首先:我们先看看Scanner类的继承树,了解一下它

image-20201203141213685

2、其次:我们看看它有的(方法)

image-20201203153805157


比较一下next() 和nextLine()

3、执行:next()时

image-20201203183743926

4、执行:nextLine()时

image-20201203183136983

若有问题可联系本人qq:2560055298 (探讨)      ---老洋
posted @ 2020-12-03 18:35  漫漫求  阅读(263)  评论(0编辑  收藏  举报