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 are facelets templates?
Define Multiprogramming and Multiprocessing in java.
0 Answers Akamai Technologies,
What means public static?
What are uses of Hash Code?
I have an HashMap object, which has with key and value pair. It has 10 keys and values in that object. Now the question is I want insert new key and value in middle or any where in that list but not at the end or at the top. Is it possible or not. If yes how can we achieve this one?
What are Inner classes?
What are the methods of object class ?
What are the ways of polymorphism other than Overridding & Overloading
What are "methods" and "fields"?
Describe the Big-O Notation.
What is the importance of finally block in exception handling?
What are the supported platforms by java programming language?