Name the main JCF interfaces and their implementations.
Arrange the following interfaces in a hierarchy: List, Set, Map, SortedSet, SortedMap,
Why Do Keys with Different Hash Codes End Up in the Same Bucket in a HashMap?
Why do i need insertion order and what is difference to sortedOrder ?
What is the difference between java.util.Collection and java.util.Collections?
Delve in fail fast in collections
Why can’t we modify a collection while iterating over it?
What is the difference between fail-fast and fail-safe?
What is the difference between Enumeration and Iterator.
How are Iterable and Iterator related?
Iterator, and “for-each” related?
Compare Iterator and ListIterator.
What about fail fast in list iterator
What happens if you call Iterator.next() without first calling Iterator.hasNext()?
How many elements will be skipped if Iterator.next() is called after 10 calls to Iterator.hasNext()?
How will collection behave if iterator.remove() is called?
How will an instantiated iterator for collection behave if collection.remove() is called?
How to avoid ConcurrentModificationException when iterating over a collection?
Which collection implements the FIFO maintenance discipline?
Which collection implements the FILO maintenance discipline?
Why ArrayDeque better than Stack ?
What is the difference between ArrayList and Vector?
Why was ArrayList added if Vector already existed?
What is faster ArrayList or LinkedList?
What is the worst case running time of the contains() method for an element that is in a LinkedList?
What is the worst case running time of the contains() method for an element that is in an ArrayList?
What is the worst case running time of the add() method for a LinkedList?
What is the worst case execution time of the add() method for ArrayList?
You need to add 1 million elements, what structure do you use?
How are elements removed from an ArrayList? How does the size of the ArrayList change in this case?
How much additional memory is needed when calling ArrayList.add()?
How much additional memory is allocated when calling LinkedList.add()?
Estimate the amount of memory required to store one byte primitive in LinkedList?
Estimate the amount of memory required to store one byte primitive in ArrayList?
Compare the interfaces of Queue and Deque
Who extends whom: Queue extends Deque, or Deque extends Queue?
Why does LinkedList implement both List and Deque?
Is LinkedList singly linked, doubly linked, or quadruple linked?
How to iterate through LinkedList elements in reverse order without using slow get(index)?
Stack is considered “obsolete”. What is recommended to replace it? Why?
Why do we need HashMap if we have Hashtable?
What is the difference between HashMap and IdentityHashMap? What is IdentityHashMap used for?
What is the difference between HashMap and WeakHashMap? What is WeakHashMap used for?
Strong references, weak, soft, phantom
WeakHashMap uses WeakReferences. Why not create a SoftHashMap on SoftReferences?
WeakHashMap uses WeakReferences. Why not create a PhantomHashMap on PhantomReferences?
LinkedHashMap – what is from LinkedList and what is from HashMap?
How does SortedMap “sort” itself, other than the fact that toString() outputs all elements in order?
What is the initial number of buckets in HashMap?
Is it possible for HashMap to degenerate into a list even with keys having different hashCode()?
In what case can an element be lost in HashMap?
Why can’t I use byte[] as a key in a HashMap?
What is the role of equals() and hashCode() in a HashMap?
What is the maximum number of hashCode() values?
What is the worst case runtime of get(key) for a key that is not in the HashMap?
What is the worst case runtime of get(key) for a key that is in the HashMap?
How many transitions are involved when calling HashMap.get(key) on a key that is in the table?
How many new objects are created when you add a new element to a HashMap?
Will HashMap work if all added keys have the same hashCode()?
How to iterate over all keys in a Map?
How to iterate over all values in a Map?
How to iterate over all key-value pairs in a Map?
What is the difference between TreeSet and HashSet?
What happens if you add elements to a TreeSet in ascending order?
How does LinkedHashSet differ from HashSet?
What are the ways to iterate over list elements?
How can you get synchronized objects of standard collections?
How can you get a read-only collection?
Write a single-threaded program that causes a collection to throw a ConcurrentModificationException.
Give an example of a collection throwing an UnsupportedOperationException.
How to make a cache with “invalidation policy” using LinkedHashMap?
How to copy elements of any collection to an array in one line?
How to get a List with all elements except the first and last 3 in one call from List?
How to convert a HashSet to an ArrayList in one line?