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

Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

985


How do you calculate roots in java?

1011


Is there a case when finally will not execute?

941


What is mean by encoding?

1019


What is the use of beaninfo?

980


Write a program to calculate factorial in java?

953


How to use string tokenizer class.

1121


What is the private method modifier?

1031


Explain methods specific to list interface?

913


What classes of exceptions may be caught by a catch clause in java programming?

1112


What is replaceall in java?

970


Explain JMS in detail.

971


Can bool be null?

932


Is string a datatype?

927


What is the difference between exception and error in java?

959