+ 1
What is the mean of (...) in java?
Please explain to me the meaning of three dots in java syntax!
1 Odpowiedź
+ 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