0
private void setUuid(int.. uuid)  
{
  // method stuff
}  

The Java 6 compiler complains when I try to use the syntax above .. Isn't the var-arg above valid ?

4
  • 3
    when the compiler complains about syntax, you check whether your syntax is correct. And guess whether you can find it in the first google result ;) Commented Apr 18, 2011 at 17:11
  • 2
    and by the way - a uuid can't be an int. Commented Apr 18, 2011 at 17:12
  • 1
    And BTW, I am not a native English speaker, but I tend to believe in written English you would use three periods too, not two of them. Commented Apr 18, 2011 at 17:13
  • 2
    in other words - it's not that we aren't willing to help, but it would just be a lot quicker and beneficial for you to do it yourself ;) Commented Apr 18, 2011 at 17:16

2 Answers 2

8

According to the 1.5 language docs it's three periods:

private void setUuid(int... uuid)  
{
  // method stuff
}
Sign up to request clarification or add additional context in comments.

Comments

6

You need three dots to make an argument a vararg.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.