When you type in a command line, it is processed before the arguments are passed to Java. Different platforms support different command line features but, fortunately, there are a couple of tricks you can use which will avoid trouble on almost any platform.
The command line is divided up at the spaces. So, what happens if you want to pass a whole phrase as a single argument to a program? The answer is to put double quote characters around it. The whole phrase is then treated as a single word, and the quotes are taken off before passing the argument to the program. For example, to pass two phrases to a program, you would type:
java Program "the first phrase" "second phrase"
Another problem is that a platform typically supports various 'clever' features. For example, most platforms, support patterns where a single argument *.txt will be treated as a file pattern and expanded into the list of files which end with .txt. If there are three such files, these will form three separate arguments to the program. Another common feature of most platforms that is worth knowing about is that if you end a command with > filename, then the output which the command prints goes into the given file instead of onto the screen.
Of course, you may want to take advantage of these special features. But suppose instead that you want to pass a phrase to a program as an argument, and the phrase contains a * or > which you don't want treated in any special way? Or how do you pass in an empty string? The answer is again to surround the phrase with double quotes. The shell then treats all special characters (including spaces) as ordinary characters:
java Program "*stars*" "<angle-brackets>" ""
Some platforms have more features than others. Unix systems typically tend to have a lot of features, triggered by a wide variety of special characters. The only safe route is to assume that any character other than a letter or digit is liable to be treated as special.