How to compare 2 arraylist ???


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to compare 2 arraylist ???

  1. #1
    Join Date
    Jan 2004
    Location
    France and work in switzerland
    Posts
    105

    How to compare 2 arraylist ???

    Dear all,

    I have 2 array list object which contains a structure object of 2 string data type as Name and Adress.

    What is the easiest way to compare the content of 2 different array list in order to know if there are similar ?
    Thanks for your help
    Regards

    CALDERARA Serge
    Maillefer S.A

  2. #2
    Join Date
    Apr 2004
    Posts
    4
    You should compare the elements in two arraylist,

    just like this: YourType1 obj1 = (YoutType1)list1[i];
    YoutType2 obj2 = (YourType2)list2[i];

    if (obj1.equal(obj2)) ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center