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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:59:11+00:00 2026-05-25T17:59:11+00:00

I have a list of URL’s added to a String[] with this. try {

  • 0

I have a list of URL’s added to a String[] with this.

try {
    Elements thumbs = jsDoc.select("div.latest-media-images img.latestMediaThumb");
    List<String> thumbLinks = new ArrayList<String>(); 
    for(Element thumb : thumbs) {
        thumbLinks.add(thumb.attr("src"));
    }
    for(String thumb : thumbLinks) {
        System.out.println(thumbLinks.get(1));
    }
}

How can i add each String that is loaded into a separate String?

EDIT:

SO as the images are loaded into the thumbLinks list. I want to get each link to a seperate

String url1;
String url2;
String url3;
  • 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-25T17:59:12+00:00Added an answer on May 25, 2026 at 5:59 pm

    If you expect a fixed number of items, and you have a fixed number of String variables, you have little choice but something like:

    String url0 = thumbLinks.get(0);
    String url1 = thumbLinks.get(1);
    ...
    String url5 = thumbLinks.get(5);
    

    Well, you could do something grim with reflection, I guess. But probably best to avoid this at all.

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

Sidebar

Related Questions

If I have this code: <div class=lists> <a href=#new_list>New list</a> </div> AND $.ajax({ url:
I have one million URL list to fetch. I use this list as nutch
I have 3 files: 1) cpf0.ml type string = char list type url =
I have a CSS like this ul { list-style-image:url(images/bulletArrow.gif); } ul li { background:
I have a list of strings where by each string is a url to
the .gitmodule file have the list of submodule url and path, similar to this
I have big URL list, which I have to download in parallel and check
I have a list that I need to send through a URL to a
I have a list of 100 proxies. The URL I am interested in is
I have a asp.net page where i query a list of url and the

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.