Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
Sort List of Objects in Java

I have 6 list of Objects in Java with a data structure like this:

Class MyObj {
    int identifier;
    Class someOtherClass;
}

Every List in the 6 Lists is a List<MyObj>.

I want to build a final list which does merge sort while reading all the 6 lists and prepare a final list.

I believe Merge Sort or similar solution is the way to go. I looked at comparator example as well but could not find one matching my requirements. Can someone suggest a library or existing API that can help me accomplish this task?

I also found a solution at How to Sort a List<T> by a property in the object but it does inArray sort, it does not tke account of multiple Lists.

All 6 Lists are already Sorted, I need combined sorted List

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!