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 / 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 |
What is parameter example?
what type of questions asked for barclays technologies pune please send urgent
What is n in java?
What is the symbol for average?
What happens when a thrown exception is not handled?
There are 100 keys and values in HashMap.how to get the keys and values?
How to override equals() and hashCode() method in java?
Do I need java on my computer?
What is stack class in java?
Why main method is static in java?
When do you get classcastexception?
what is meant by UP& DOWN casting in java?