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

  • Home
  • SEARCH
  • 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 4005600
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:24:48+00:00 2026-05-20T08:24:48+00:00

This should be a fairly simple question to answer. I looked around and couldn’t

  • 0

This should be a fairly simple question to answer. I looked around and couldn’t find any topics on this syntax, and the “…” makes searching for it difficult on Google. I’m working on a simple test application for copying a database file from its protected location on an un-rooted Android phone to a place on the SD Card that I can access for viewing with the sqlite3 database viewing tool. I know this seems like a roundabout way of doing things, but the emulator refuses to open on my netbook, so I’m using my cell phone to test the development for right now.

The code has already been written, so I’m borrowing it from here and adapting it to my code. I’ve come across this little snippet of code:

private class ExportDatabaseFileTask extends AsyncTask<String, Void, Boolean> {
  private final ProgressDialog dialog = new ProgressDialog(ManageData.this);

  // can use UI thread here
  protected void onPreExecute() {
     this.dialog.setMessage("Exporting database...");
     this.dialog.show();
  }

  // automatically done on worker thread (separate from UI thread)
  protected Boolean doInBackground(final String... args) {

I’ve never seen the argument final String... args before. What does this mean/do?

Thank you!
Moscro

  • 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-05-20T08:24:48+00:00Added an answer on May 20, 2026 at 8:24 am

    The ellipses in the argument in Java means vararg of the type. So, in your case, ... means you can pass any number of String parameters to the doInBackground methods.

    So, you can call this method doInBackground("String1", "String2", "String3") or also doInBackground("String1") or also doInBackground("String1", "String2", "String3", "String4") or any other form.

    See here http://download.oracle.com/javase/1.5.0/docs/guide/language/varargs.html

    The three periods after the final parameter’s type indicate that the final argument may be passed as an array or as a sequence of arguments. Varargs can be used only in the final argument position. Given the new varargs declaration for MessageFormat.format, the above invocation may be replaced by the following shorter and sweeter invocation

    and final has it’s usual meaning. BTW, this feature is available in Java5 or newer.

    Refer: http://www.developer.com/java/other/article.php/3323661

    As the above two links mentions, it’s nothing but sugared array. Basically, when you define myMethod(T... vararg), Java sees it as myMethod(T[] vararg). And when you call, myObj.myMethod(t1, t2, t3, ..., tn), Java passes it as myObj.myMethod(new T[]{t1, t2, t3, ..., tn}).

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

Sidebar

Related Questions

This should be a simple question, but I haven't been able to find a
This is a fairly simple question (or at least from the outset it should
This should be a fairly simple question but I know very little about SQL.
This should be a fairly simple question. Essentially, I believe there's a good chance
This is maybe a simple syntax question or possibly a best-practices question in terms
This should hopefully be a simple one. I would like to add an extension
This should a quick question for some easy rep. I'm doing some PHP Website
This should be a really really simple thing, but for some reason it is
This should be straight forward for a guru. I don't have any code really
I have what should be a relatively simple question that I can't seem to

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.