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

What are peerless components in java programming?

1012


What is an anonymous class in java?

1102


Why generics are used in java?

1044


Is linked list a linear or non-linear data structure?

971


Is namespace same as package in java?

984


How do you ensure that n threads can access n resources without deadlock?

1309


Why do we use string?

1041


What are parameters in a method?

1104


What is the difference between a constructor and a method?

1249


Differentiate between nested and inner class in java.

999


What is ascii code?

1265


What is sorting in java?

986


why not override thread to make a runnable? : Java thread

1002


What are the differences between wait() and sleep()?

1016


explain multi-threading in java?

1028