Question: > 
> **Possible Duplicates:**  
> 
> [What does “…” mean in Java?](https://stackoverflow.com/questions/4618930/what-does-mean-in-java)  
> 
> [Java array argument “declaration” syntax](https://stackoverflow.com/questions/4211099/java-array-argument-declaration-syntax) 
> 
> 
> 

Can anyone confirm if I'm right in seeing the `Object...` parameter in the method call below:

```
public static void setValues(PreparedStatement preparedStatement, Object... values)
    throws SQLException
{
    for (int i = 0; i < values.length; i++) {
        preparedStatement.setObject(i + 1, values[i]);
    }
}    

```

As an array of type Object? I don't recall seeing `...` before in Java.

Answer: 
It's equivalent to `Object[]`, but allows the caller to just specify the values one at a time as arguments, and the compiler will create an array. So this call:

```
setValues(statement, arg1, arg2, arg3);

```

is equivalent to

```
setValues(statement, new Object[] { arg1, arg2, arg3 });

```

See the [documentation for the varargs feature](http://download.oracle.com/javase/1.5.0/docs/guide/language/varargs.html#%5D) (introduced in Java 5) for more information.
What you are looking at is a varargs parameter. The documentation on it can be found [here](http://download.oracle.com/javase/1.5.0/docs/guide/language/varargs.html).

Varargs are equivalent to an object array, but there is syntactic sugar to make calling that method easier. So the old way was (this code is from the document above):

```
Object[] arguments = {
    new Integer(7),
    new Date(),
    "a disturbance in the Force"
};

String result = MessageFormat.format(
    "At {1,time} on {1,date}, there was {2} on planet "
     + "{0,number,integer}.", arguments);

```

With varargs you get to write:

```
String result = MessageFormat.format(
    "At {1,time} on {1,date}, there was {2} on planet "
     + "{0,number,integer}.", 7, new Date(), "a disturbance in the Force");

```

Note that autoboxing helps here to convert the int 7 to `new Integer(7)` without you having to explicitly declare it.