Public list<?> Find (final String queryString, final Object ... values) throws DataAccessException
Methods for defining the variable number of arguments
Simply add three consecutive "." Between "type" and "parameter name" of a formal parameter. (That is, "...", an ellipsis in an English sentence), it can be matched to an indeterminate argument. A method with such a parameter is a variable number of arguments.
Listing 1: A method with a variable number of arguments
Private Static intSumUp (int... values) {
}
Private Static intSumUp (int... values) {
}
Note that only the last formal parameter can be defined as "can and does not have an argument to match". Therefore, there can be only one such parameter in a method. Also, if the method has other parameters, put them in the front position.
The compiler converts the last parameter into an array parameter behind the box and makes a tick in the compiled class file, indicating that this is a variable number of arguments.
Listing 2: Secret form of methods with variable number of arguments
Private Static intSumUp (int[] values) {
}
Private Static intSumUp (int[] values) {
}
Because of this transformation, it is no longer possible to define a method that is consistent with the converted method signature for this class.
Reference post: http://www.cnblogs.com/shishm/archive/2012/01/31/2332656.html
Java mutable Parameter Object ... values