Java Related | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Java Related

Is there any difference between public static void main (String [] args) and public static void main (String args[]) ?

11th Aug 2017, 5:28 AM
JIKKU VARGHESE THOMAS
JIKKU VARGHESE THOMAS - avatar
2 Answers
+ 3
no there is not, they are just two ways to declare arrays. Both work, although the first is used more often.
11th Aug 2017, 7:26 AM
Claudiu Stefan Haidu
Claudiu Stefan Haidu - avatar
+ 2
both the same you dont need to use args either you can put any variable in there.
11th Aug 2017, 10:20 AM
D_Stark
D_Stark - avatar