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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:55:53+00:00 2026-06-02T18:55:53+00:00

This question is an exact duplicate of: What does <> (angle brackets) mean in

  • 0

This question is an exact duplicate of:
What does <> (angle brackets) mean in Java?

I am reading about AsyncTask in Android. I have this example code:

private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> {
     protected Long doInBackground(URL... urls) {
         int count = urls.length;
         long totalSize = 0;
         for (int i = 0; i < count; i++) {
             totalSize += Downloader.downloadFile(urls[i]);
             publishProgress((int) ((i / (float) count) * 100));
         }
         return totalSize;
     }

     protected void onProgressUpdate(Integer... progress) {
         setProgressPercent(progress[0]);
     }

     protected void onPostExecute(Long result) {
         showDialog("Downloaded " + result + " bytes");
     }
 }

And it is supposed to be called with:

new DownloadFilesTask().execute(url1, url2, url3);

I can’t understand what <URL, Integer, Long> means. I have seen them in some other classes like String<> but I don’t know what is the purpose of them.

  • 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-02T18:55:55+00:00Added an answer on June 2, 2026 at 6:55 pm

    It defines the types of generics.


    For example:

    List<Integer> list;
    

    You declare a variable of class List. But List is declared like this, if I’m right:

    public interface List<T> extends Collection<T>
    

    The T is a placeholder for a type that the user of this class can define. In my example, I chose to fill in the T with Integer. In this case it means I’ll have a List of Integers.

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

Sidebar

Related Questions

Closed as exact duplicate of this question . I have an array/list of elements.
This question is an exact duplicate of: Why generate long serialVersionUID instead of a
Closed as exact duplicate of this question . But reopened, as the other Singleton
Duplicate of this question . update - This is not an exact duplicate. See
I seem to have the exact opposite problem than this question on stopping dock
This is an exact duplicate of this question ; however the code linked in
I know there is a seemingly exact duplicate of this question here: iPhone SDK:
I have the exact same problem as the guy who wrote this question. The
Duplicate - this exact question was asked here - the only solution seems to
This question is an exact duplicate of: How to append an array to an

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.