+ 1

[DUPLICATE] What is the differnce between String [ ] args and String args[ ]

java basics

14th Apr 2018, 7:56 AM
saurav
saurav - avatar
4 Answers
+ 9
There's no difference, these are just two different ways to express the same thing.
14th Apr 2018, 8:26 AM
Tashi N
Tashi N - avatar
+ 7
Then please post the complete method definition which doesn't run...
14th Apr 2018, 9:00 AM
Tashi N
Tashi N - avatar
+ 1
Tashi N is right.. if you define an array. there is no different... whether you define in public static void main(String...a) or public static void main(String [] a) or public static void main(String a[]) or you want to define at array as a variable .. In my every code of java.. i define like this.. public static void main(String... a)
14th Apr 2018, 10:08 AM
Arun Tomar
Arun Tomar - avatar
- 3
no there is some difference sometimes while programming i see the program runs but says cannot find main method and it doesn't execute the program
14th Apr 2018, 8:38 AM
saurav
saurav - avatar