Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java coding confusion about String args[] and String[] args

Tags:

java

I am new in programming with Java and I am confused about the following two statements:

public static void main(String args[])

and

public static void main(String[] args)

Are they same? If not, how are they different from each other?

like image 824
Clara Hasan Avatar asked Dec 09 '22 03:12

Clara Hasan


1 Answers

There is no semantic difference between the two forms, the only difference is stylistic.

like image 172
NPE Avatar answered Dec 11 '22 16:12

NPE