887785 wrote:
Can you for example show, whe need i call method next() and why?

He already told you both of those things.

When:

First you call Scanner.hasNext() to see if the Scanner has anything for you to process. Your next step should be to call Scanner.next()

Why:

to get that thing

Please do spend some time thinking about the responses you get, as well as writing code to follow the advice given. Even if you don't understand the answer 100%, it should be enough to give you an idea of what to try, and you should be able to play around with it for a little bit. If you still are stuck after that, post again, but remember, the burden is on you to do the hard work.