IMNSHO, I'd put this a bit more strongly: never, ever, use Hashtable (or Vector) if you don't absolutely have to.
Hashtable is supposed to perform slower than HashMap. Maybe because is synchronized by default. You should use HashMap because is the newest class. [...]
In addition to the things you mentioned, a LinkedList is very bad at finding an arbitrary element in the middle of the list (i.e. list.get(i)). An ArrayList, on the other hand, is good at inserting or deleting elements at the end of the list but very bad at doing this anywhere else in the list.
A linkedList performs better than an arrayList if frequent insertions and removals are required. Otherwise use the latter because is faster.
So can an ArrayList; in fact, so should any implementation of the List interface, since it is part of the List API.
a) a linkedList can provide a ListIterator.
The implications are for performance and ordering. See below. The second statement essentially says that a HashSet will have the same characteristics as a HashMap.
As per api for HashMap it says "
"Hash table based implementation of the Map interface"
Similarly for HashSet it says
"This class implements the Set interface, backed by a hash table (actually a HashMap instance). "
What is the implication of these statements ?
HashSet is an implementation of the Set interface that uses a hash table behind the scenes. This has implications for the kinds of objects you can store and for its performance.
I forgot to add this.. what is the difference between Set and HashSet? Both of them implement the Set interface.