This week's book giveaway is in the Spring forum.
We're giving away four copies of Modern frontends with htmx and have Wim Deblauwe on-line!
See this thread for details.
Win a copy of Modern frontends with htmx this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

collecition class

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i provided the consolidated info about the

collection classes which i liked some to comment on

it..


List

accessed based on Index value
its an ordered collections

ArrayList
fast iteration
implement RandomAccess interface

Vector
Synchronised form of ArrayList

LinkedList

Faster addition and deletion.
Able to add at either end(front and back)
Insertion or Access order

set

unique values

Hashset
unordered and unsorted

LinkedHashset
Insertion or Access order

Treeset
sorted by natural orders

Map
key/value pairs

HashMap
unordered & unsorted
one null key and many null value
faster insertion and deletion than linkedhasmap

Hashtable
synchronised version of HashMap
null are not allowed.


LinkedHashMap
Faster iteration
Access or insertion order.

TreeMap
sorted version based on natural ordering





for any addition and deletion of above info do it on the same
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good job with summarizing the same.

If possible add something about the decision for an array instead of collection, in some cases
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very nice summary. I see one small fact that differs from K&B's info. You say that LinkedHashSet is ordered by Insertion or Access order (same as LinkedHashMap), but on page 429 of K&B they say that although LinkedHashMap is ordered by insertion order or last access order, LinkedHashSet is only ordered by insertion order.

And you didn't capitalize the Set interface, but that's not a big deal either, since we all know it's capitalized.

Good job!
 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi joe

this is how k&b is given

Optionally, you can construct a LinkedHashSet
so that it maintains the order in which elements were last accessed, rather than the
order in which elements were inserted.
 
Always! Wait. Never. Shut up. Look at this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic