I'm getting all the links from a web page and displaying them in a listView box. How do I prevent duplicates? I know how to block some links that I don't want by using the StartsWith and Equals and those functions. Do I do something with those or is there more to it?

Recommended Answers

All 3 Replies

Well, if you scan over the website content and find the link.
Check if the link in the arraylist or not with arraylist.contain().
If sastify, you can add that link to an arraylist.

If you load them all into an array you can extract disctingly unique values from it.. (theres a hint in there)

Thanks guys. I put the links in a list but decided to do something totally different on what I planned on doing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.