+ 1

What is the difference between String...args vs String [] args(as parameters in main) in java ?

15th Aug 2019, 8:06 AM
spark
spark - avatar
7 Réponses
+ 2
varargs ... must be last in order of parameters cant use two varargs ... in one method parameters
15th Aug 2019, 9:26 AM
zemiak
+ 2
sure, not in main()
15th Aug 2019, 9:40 AM
zemiak
+ 1
difference is in methods with different types of parameters, you can still use varargs ... but there it depends of order of parameters, compared to String[] which is independed of parameter order.
15th Aug 2019, 9:12 AM
zemiak