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

How to declare unique ArrayList ?

Answer Posted / ballu

i think java does not this in built facility ... you would
need to make sure that objects inserted in array are unique
( by overriding equals() and hash() method of Object class

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which collection does not allow duplicates in java?

919


How many types of design patterns are there?

1043


What is the association?

924


Does substring start with 0?

931


Is a boolean variable?

950


Who is the owner of java?

950


What happens when a thrown exception is not handled?

1049


Why java is a platform independent? Explain

1004


How large is a boolean?

948


What is passed by reference and pass by value ?

983


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1139


How many types of java are there?

926


What is the structure of java?

960


Can I import same package/class twice?

892


Add a value x to array from index l to r where 0 <= l <= r <= n-1

1022