- 0
Java ArrayList's and Collections
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Download: Java All-in-One For Dummies, 7th Edition ($27 Value) — free for your email
By News Staff,
- ebook offer
- sponsored
- (and 3 more)
- 0 replies
- 3 views
-
Learn Java with Projects (worth $44.99) but free in exchange for your email
By News Staff,
- packt
- ebook offer
- (and 2 more)
- 0 replies
- 3 views
-
JavaScript from Frontend to Backend ($20.99 Value) FREE for your work email
By News Staff,
- ebook offer
- sponsored
- (and 3 more)
- 0 replies
- 3 views
-
- 0 replies
- 3 views
-
Job Ready Java ($24 value) free download for a Limited Time
By News Staff,
- ebook offer
- java
- (and 1 more)
- 0 replies
- 2 views
-
Question
timsweb
Hi All,
I was wondering if I could get some advise on ArrayList's and Collections,
I currently have an ArrayList which becomes big in size, roughly 100,000 - 1,000,000 items, which are of a type I have created, Customers,
When searching the ArrayList, which I currently do with a for loop, I am searching for a match on 2 string items in the Customer object,
My question is how can I make this more efficient as from what I have seen, maps use numerical indexes, when the data I need a match on are Strings,
Also so you know, it is safe to assume the 2 string items in the Customer object are unique when put together,
Any ideas or advise on the best route to go would be great :)
Thanks, Tim
Link to comment
Share on other sites
6 answers to this question
Recommended Posts