Научился: After Viktor from Mother of russian cityes, I'll try to comment my reports in language of foggy Islands where so love to ride bikes.
java.util.Scanner reads data from the source that you specify for it (for example, from a string, from a file, from the console).
Further, it recognizes this information and processes it as needed.
There is one more method that you must necessarily pay attention - close ().
Like any object that works with I/O streams, the scanner must be closed at the end of its work in order not to consume any more resources from our computer.
Never forget the close () method!