We help IT Professionals succeed at work.
Get Started
Troubleshooting Question

How to compare 2 large sets of id numbers in Java?

Terry Woods
Terry Woods asked
Last Modified: 2021-02-07
I have 2 files containing around 1 million id numbers each (string data type). I want to work through one set of id numbers, tagging ones that exist in the other file, and saving the result to a new file. What's a good data structure to do this efficiently, using Java?
This is a task for a data migration, so needs to be reasonably simple to write, but doesn't need to be completely optimal, as long as it takes less than about an hour to run.
Watch Question
This problem has been solved!
Unlock 3 Answers and 31 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE