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 8301457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:57:38+00:00 2026-06-08T16:57:38+00:00

What do three dots (…) indicate when used as a part of parameters during

  • 0

What do three dots (…) indicate when used as a part of parameters during method definition?

Also, is there any programming term for the symbol of those 3 dots?

I noticed in a code sample:

public void method1 (Animal... animal) {
// Code
}

And this method was called from 2 places. The arguments passed while calling were different in both scenarios though:

  1. Array of objects is passed as an argument to method1(Animal…)

  2. Object of class Animal passed as an argument to method1(Animal…)

So, is it something like, if you are not sure whether you will be passing a single element of an array or the entire array as an argument to the method, you use 3 dots as a part of parameters in the method definition?

Also, please let me know if there is any programming term for the symbol of those 3 dots.

  • 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-08T16:57:43+00:00Added an answer on June 8, 2026 at 4:57 pm

    It’s called varargs.

    It means you can pass as many of that type as you want.

    It actually translates it into method1(Animal[] a) and you reference them as a[1] like you would any other array.

    If I have the following

    Cat whiskers = new Cat();
    Dog rufus = new Dog();
    Dolphin flipper = new Dolphin();
    
    method1(whiskers, rufus, flipper); // okay!
    method1(rufus); // okay!
    method1(); // okay!
    method1(flipper,new Parakeet()); // okay!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to set DPI (dots per inch) in case of PDFsharp?
Any idea how i can get rid of the three dots that appear on
There used to be 3 dots in the splitter bar of a SplitContainer. Just
I'm currently programming an app that deals with line graphs. I have three dots
Three.js is commonly used with WebGL, but I am interested in using its CanvasRenderer,
I have a carousel slider, which have three static dots in the corner, one
If I try to write 3.toFixed(5) there is a syntax error. Using double dots,
I'm wondering if there is a way to keep the dots visible for each
I want to create a small button with three dots on it, like we
On my site, if a url contains three or more dots followed by a

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.