The code:
methodName(String[] args):
means that an array of strings can be passed to this method.
Often you see this:
main(String[] args):
This the args will get passed the command line argument as an array of
strings. Take this code:
class ProcessFile{
public static void main(String[] args){
System.out.println(args[0]);
}
}
Now if you typed:
java ProcessFile myFile.txt
You will see
myFile.txt
If you did not put the [] after String, the method main would think it
was getting just one string. But in fact the main method can take many
strings. So the brackets indicate that the arguement passed to the
method is an array.