This is a general question for beginners. I am new to java and browsing through StackOverflow and CodeReview. I find these two different formats:
example 1 :
public static void main(String args[])
or
example 2 :
public static void main(String[] args)
This is what I have in the course notes:
These words are called modifiers. For the main () method, the word void also precedes that it does not return any value. Also, the main () method always has a list of command line arguments that can be passed to the program
main (String [] args)
which we will now ignore.
So, as you can see, we were told to ignore this for now, but I would like to know:
Is there any difference between them, if so, then what?
source share