If you mean what is the difference between public static void main(String args) and public static void main(String argv) the answer is they are the same. The arg bit is just a made-up name. The convention happens to be to use args or argv (short for arguments I guess) in this situation but it is not required. You could also write public static void main(String eddie) if you wanted (or anything else). Linda [ December 04, 2002: Message edited by: Linda Jones ]
argv was the C standard name for the arguments. It stood for "argument vector". The Java standard uses args, which just stands for arguments. In C programs, argv is the name of the program being executed, while in Java, args is just the first command argument. The executable name doesn't exist. Of course, as was already pointed out, args or argv is just a parameter name. You could call it "fred" and it would still work. Your command parameters would then be accessed by fred, fred, ...
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
Create Edit Print & Convert PDF Using Free API with Java