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...

I have one POJO class(Java bean class), it has two
variables for that it has setters and getters. Now i have
created two objects for that class and i have set the data
for those variables through this two objects. Now question
is i want check whether those two objects have same data or
not, for this write a program? Thanks, Bose.

Answer Posted / murli

override equals method from object class and have the comparison logic inside that.Also override hashcode method..
Now pBeanOne.equals(pBeanTwo) will give you the result

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

969


What is the difference between an argument and a parameter?

989


What is t in parametric equations?

985


What are synchronized methods and synchronized statements in java programming?

1011


What is a jit compiler?

1128


What is meant by final class?

1102


what is ststic with example

2041


Name four container classes.

984


What is unicode with example?

1200


What is final access modifier in java?

1136


What is a newline character in java?

1034


What is a method declaration?

984


What is a instance variable?

1054


Is string is a class in java?

955


Why do we need data structure in java?

1065