+ 1

What is the mean of (...) in java?

Please explain to me the meaning of three dots in java syntax!

18th May 2019, 3:13 AM
Abdol Hashimi
Abdol Hashimi - avatar
1 Réponse
+ 9
 The three dots can only be used in a method argument, and are called 'varargs'. It means you can pass in an array of parameters without explicitly creating the array. In other words, method(String...) means passing a variable number of parameters to the method
18th May 2019, 3:16 AM
Why So Serious ?
Why So Serious ? - avatar