This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes About Collections (Characterist) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About Collections (Characterist)" Watch "About Collections (Characterist)" New topic
Author

About Collections (Characterist)

Milton Ochoa
Ranch Hand

Joined: Oct 23, 2007
Posts: 336

Hi everyone,

Please somebody help, this table is right? or I miss something? or I Wrong?

Please correct me if I wrong.

Thanks

Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3168
    
  10
What do you consider to be the difference between ordered and sorted ? I'm just asking as someone here wanted to know.


Joanne
Milton Ochoa
Ranch Hand

Joined: Oct 23, 2007
Posts: 336

I will reply
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm not sure what "Fast for Access (Iterate)" means. If you use an Iterator, then all these collections and maps are reasonably fast, including LinkedList. It's when you use methods like get(index) or get(key) that speed differences become important - LinkedList has very poor performance when you use get(index). That's the only one that is really bad. Here's how I would modify the table:



In general Good means O(1), Fair means O(log(N)) and Poor means O(N). For example, a LinkedHashMap may be twice as slow as a HashMap, but that rarely matters - it's still notably faster than a TreeMap.

Note that ArrayList and Vector are Good at inserting or deleting at the end, but Poor in general. LinkedList is Good at inserting or deleting from either end, or while using an Iterator. Both are Poor at inserting or deleting from the middle if you aren't using an Iterator.
[ January 23, 2008: Message edited by: Jim Yingst ]

"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Collections (Characterist)
 
Similar Threads
Scope coding question
If condition
How to set focus on JTable
SCJA Java Examples