First, do you want to give a filename as a argument with your program. Or the whole file as input? In the first case you do:
"program filename.txt"
In the second you input:
"program < filename.txt".
In the first case the filename is the input. And your program will have to open a file itself. In the second case the contents of the file are given as input of the file.
If you only give the filename, the filename is in the arguments of your main function (the array args of the "main(String args[])" part. Using this filename you can then use the earlier suggested readFileToString to convert the contents of the file into a string.
If you want to use the other method of file input "program < filename.txt", use the a InputStream for that. See the documentation for more information about InputStream http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html
You also mention you are rather new to Java. I hope you do know of the existence of the java documentation? http://download.oracle.com/javase/6/docs/api/index.html contains a lot of information you might want to know.