I was looking through some code and saw the following notation. I’m somewhat unsure what the three dots mean and what you call them.
void doAction(Object...o);
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It means that this method can receive more than one Object as a parameter. To better understating check the following example from here:
This is very useful since it permits your method to became more abstract. Check also this nice example from SO, were the user takes advantage of the … notation to make a method to concatenate string arrays in Java.
Another example from Variable argument method in Java 5
As mention in the comment section: