Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8935273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:57:19+00:00 2026-06-15T09:57:19+00:00

I was looking through some code and saw the following notation. I’m somewhat unsure

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:57:20+00:00Added an answer on June 15, 2026 at 9:57 am

    It means that this method can receive more than one Object as a parameter. To better understating check the following example from here:

    The ellipsis (…) identifies a variable number of arguments, and is
    demonstrated in the following summation method.

    static int sum (int ... numbers)
    {
       int total = 0;
       for (int i = 0; i < numbers.length; i++)
            total += numbers [i];
       return total;
    }
    

    Call the summation method with as many comma-delimited integer
    arguments as you desire — within the JVM’s limits. Some examples: sum
    (10, 20) and sum (18, 20, 305, 4).

    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

    public static void test(int some, String... args) {
            System.out.print("\n" + some);
            for(String arg: args) {
                System.out.print(", " + arg);
            }
        }
    

    As mention in the comment section:

    Also note that if the function passes other parameters of different
    types than varargs parameter, the vararg parameter should be the last
    parameter in the function declaration public void test (Typev … v ,
    Type1 a, Type2 b)
    or public void test(Type1 a, Typev … v
    recipientJids, Type2 b)
    – is illegal. ONLY public void test(Type1 a,
    Type2 b, Typev … v)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking through some code today and saw something like the following: var
I was looking through some code and i saw this: <xsl:variable name=newlist select=concat(normalize-space($list), '
I was looking through some inherited PHP code when I found the following: $emails=array();
Recently I was looking through some website's code, and saw that every <div> had
Looking through some code I came across the following code trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto)); and I'd like
I am looking through some C source code and I don't understand the following
I was looking through some code the other day and I saw something like
I'm looking through some code for learning purposes. I'm working through this portion of
So I'm looking through some code, and I see this: class whatever { public:
I have been looking through some code on an open source project recently and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.