Problem with invoking a method

Hi, I have a problem in Java with invoking the method "handleInput" in the method "topLoop". The thing is that when you type something the message "Unknown command 'command'" should appear ('command' is the output from index 0 in a string-array) but when the input is empty I DON'T want the message to appear at all, the message should only appear once you write something. And when you type "quit" it will simply exit the program after you've confirmed with "y". Everything works except that when the input is empty the message is still shown, so how do I invoke the handleInput-method in the topLoop-method so that this will work?

One possible problem is having more than one instance of the Scanner class. The Scanner class will read input and save it in a buffer. So the first instance reads and saves some of the input, the second instance will miss it.
Define ONE instance of the Scanner class object and share it with all the methods that are reading user input.

when the input is empty I DON'T want the message to appear at all,

Use an if statement with one of the String class's methods to test for the empty String and skip printing a message if it is.

Can you copy the contents of the command prompt window and paste it here showing the input to the program and what it prints out?

One possible problem is having more than one instance of the Scanner class. The Scanner class will read input and save it in a buffer. So the first instance reads and saves some of the input, the second instance will miss it.
Define ONE instance of the Scanner class object and share it with all the methods that are reading user input.

Use an if statement with one of the String class's methods to test for the empty String and skip printing a message if it is.

Can you copy the contents of the command prompt window and paste it here showing the input to the program and what it prints out?