Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In the first case, reading is faster. If the user enters everything manually, then you will not notice the acceleration.
Further convenience just for you. The first option allows you to read character by character / line by line / a certain length. The second option has a bunch of methods for reading a specific data type. For example, you ask the user to enter a number and make a call to in.nextInt().
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question