Var-arg syntax in Java
private void setUuid开发者_如何学C(int.. uuid)
{
// method stuff
}
The Java 6 compiler complains when I try to use the syntax above .. Isn't the var-arg above valid ?
According to the 1.5 language docs it's three periods:
private void setUuid(int... uuid)
{
// method stuff
}
You need three dots to make an argument a vararg.
精彩评论