The args array that is passed into main contains the arguments that are given from the command-line. Marilyn gives a good example of how this works. Typically each command-line argument is separated by white space. When you type "java MyClass" at the command-line, anything that follows is put into the args array. So if you do "java MyClass file1.txt file2.txt", then args holds the string "file1.txt" and args holds the string "file2.txt". That's really all there is to it.
Hopefully between Marilyn's example and my more general explanation, you can figure out what to do here. Let us know if you have any more questions.