As in other programming languages: C++ and C, for example, the three dots (...) are used when declaring a method as a parameter.
These points allow NO arguments to be passed, as well as multiple arguments to be passed when the method is called. These three points are also known as var args.
Examples
Suppose you have this code below with a method named threePoints that returns a String and also receives a var args as String:
Note that the method does not specify that it receives only 2 arguments, but we pass 2 arguments and it returns the output:
If I don’t pass arguments or pass more than 2 it will understand normally, for example:
The output will be:
We could also use another method, this time of type void and which receives var args of type int:
Calling: without passing arguments and with a varied number of arguments!
It will work normally, in addition to the output of the threePoints() method we will also have: