void doSomething(String... strings) {
for (String s : strings) {
System.out.println(s);
}
}
The three periods after the final parameter's type indicate that the final argument may be passed as an array or as a sequence of arguments. Varargs can be used only in the final argument position.