Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS
CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO
LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE
NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

Answer Posted / fraz

Lets say you have Employee class

public class Employee{
private String id;
private String name;
..getter/setters..

}

You just have to overide hascode() and equals() method in
above class.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the lifetime and scope of a variable?

1022


What is the default value of an object reference declared as an instance variable?

1130


What is the finalize method do?

1106


What does exp mean in math?

997


What are the types of methodology?

1106


What is append function?

1007


Explain about fail fast iterators in java?

1064


What are unchecked exceptions in java?

1045


Can inner class be public in java?

1025


How to declare an arraylist in java?

1121


What is the difference between multitasking and multithreading in Java

1192


What does \ mean in regex?

1228


Can singleton class be serialized?

961


What are 3 data types?

1002


Why collection is called framework in java?

994