0

what methods should I use for input data of the different types?

I know "nextInt()","nextLine()".but what about the other ones?

15th Jan 2017, 7:39 PM
Nochains
Nochains - avatar
2 Réponses
+ 1
firs of all you have just next() that reads a single String. it only reads one "word". nextLine() reads an entire line. for numbers you follow the same recipe. nextInt for integers, nextDouble for doubles, nextFloat, nextLong, nextBoolean... you should really visit oracles site
15th Jan 2017, 9:35 PM
Rastko Savic
Rastko Savic - avatar
0
yeah, I will
16th Jan 2017, 5:41 AM
Nochains
Nochains - avatar