Avatar of jaipur07
 asked on

comparing strings stored in data structures?

Hi All

Exploring some best practices. I have 2 Text files having 200 lines of text.
I want to compare all lines of both files and extract the extra lines from both of the files.

any idea of best practices?

Avatar of undefined
Last Comment

8/22/2022 - Mon

Since the files are so small, you can load them in memory, and then compare them.

It's best to use twa array lists, each line should be stored as a String element in the array list.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes