Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Scanner class

User_WL6FPOct 12 2018 — edited Oct 17 2018

How do I read these inputs in Scanner class ?   Input :   12 15 18 // 3 integers input in one line

my doubt here is, should I use nextInt()  3  times Or should I use nextLine()  to read the entire line and tokenize to get these three integers?

Comments

Post Details

Added on Oct 12 2018
3 comments
361 views