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
Why is java multithreaded?
Is java type safe?
What is the meaning of 3 dots in java?
How do you bind variables?
what is meant by Garbage collection?
Can we write class inside a class in java?
What does you mean in math?
What is singleton class and how can we make a class singleton?
What is the difference in between cpp and java? Can u explain in detail?
What is a cup of java?
Describe different states of a thread.
What is an 8 bit word?
Is alive in java?
Is void a return type?
What is used of static keyword in java?