In this tutorial, I discuss the concept of "vararg" which refers to passing an arbitrary number of arguments to a method at the call time. I also discuss what happens behind the scenes when javac compiles a vararg method.
For more reading material, see:
https://www.baeldung.com/java-varargs