Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE ..

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

Post New Answer

More Core Java Interview Questions

Can you explain the cs option of java interpreter?

0 Answers  


suppose string s1="rajnish"; string s2="bhaskar"; then what will be happend ?

9 Answers   Fidelity,


Can a set contain duplicates?

0 Answers  


What are the 8 primitive data types in java?

0 Answers  


What is a lock or purpose of locks in java?

0 Answers  


Is null a string in java?

0 Answers  


What are wrapper classes in java?

0 Answers  


How many static init can you have?

0 Answers  


When does the compiler supply a default constructor for a class?

9 Answers   TCS,


What is byte code and why is it important to java’s use for internet programming?

0 Answers  


Define packages in java?

0 Answers  


What is meant by data hiding/encapsulation?

0 Answers   Cyient,


Categories