So... Basically, you took a program from the web. And used that as an example, as you followed instructions on how to compile and run the program. And everything worked.
Which is great!!... Most people start with the HelloWord application. It took guts starting with a larger program.
Unfortunately, the program you choose doesn't take input from the prompt. You need to know
Java to modify it... So... How much do you know? Do you know enough to understand the code that you just ran? Do you know how to read from the command line? etc.
Henry