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 nested interface?
can u handle an error if u write Thowable in the catch class lise try { some errorneous code }catch(Throwable e){ ...}
What do you mean by synchronized non access modifier?
What is unmodifiable collection in java?
What is a generic code?
abstract class A{ int list []=new int [100]; A(int x,int y){ rondom n=new rondom(); for (int i==;i<100;i++); list [i]=x+r.next int(y-x+1); abstract sort (); abstract binary sarch(int temp); class B extends A{
how to print a numbers from 1 to 100 with out using control structures?
Which collection is sorted in java?
What class is used to create Server side object?
Program to Find the second largest element in an array.
What is java util?
What is the use of a copy constructor?