What do the 3 dots following String
in the following method mean?
public void myMethod(String... strings){
// method body
}
Adding to the other well-written answers, an advantage of varagrs
I found useful is that, when I call a method with array as a parameter type, it takes away the pain of creating an array; add elements and then send it. Instead, I can just call the method with as many values as I want; from zero to many.