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 |
How many bytes is a char in java?
What is method reference?
Can java object be locked down for exclusive use by a given thread?
What is encapsulation? Elaborate with example?
What is meant by anonymous class?
Can a class have an interface?
Define a java class.
What is difference in between java class and bean?
What is numel matlab?
What is the purpose of final keyword and when to use it?
What does java edition mean?
which class is the wait() method defined in? : Java thread