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

which one is performance wise advantageious from List,Set,Map?

Answer Posted / debapriya

See HasMap is used when u want to use key value pair
If u r storing Any Objects the better u write ur code for
hascode implementation ,the better the the retrieval process is

Set maintains order,each time u add a object ,it checks
whether it exists or not calling equals which in turn calls
the hashcode method(x.equals(y) means x.hashcode==y.hashcode)

List --->in case if u use Vector or ArrayList since both of
them implenets RandomAccessInterface so retrieval is faster
but addition or deletion is slower

LinkedList --->deletion or insertion is faster but does not
implemet RandomAccess interface

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between static and dynamic class loading.

1104


Can long be null in java?

1000


What is return type in java?

1051


What are inner classes or non static nested classes in java?

1165


Why unicode is important?

918


Can you explain the cs option of java interpreter?

934


What is int lol?

1124


Explain about version control?

1018


What do you understand by copy constructor in java?

923


What is difference between == equals () and compareto () method?

1025


Can we write any code after throw statement?

1041


What is the purpose of the System class?

988


What's the access scope of protected access specifier?

1020


What is the final field modifier?

964


Can we sort list in java?

964