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 are sets in java?

924


What is jvm? Why is java called the platform independent programming language?

1000


What are java packages?

1016


Is java map thread safe?

940


What is a package in java? List down various advantages of packages.

1259


How can you make a class serializable in java?

975


What is java command?

1061


What if static is removed from main method?

1054


How many ways can we create the string object?

998


Can we have try block without catch block?

1013


Explain 5 features introduced in jdk 1.7?

1005


Does list allow duplicates in java?

920


What is a boolean expression in java?

1002


What is difference between ++ I and I ++ in java?

955


make a method which any number and any type of argument and print sum of that arguments.....

1789