Java SE Collections

Print the objectives

Take the exam   Take a beta test

The Java SE Collections exam covers collection classes from the java.util package, including some from the .concurrent sub-package.

You'll need a strong knowledge of Iterators, Collections and Maps, and sorting, converting and copying them. Java 5 new features concerning collections are covered.

Prerequisites: We recommend that you first complete the Java SE - Basic and Java SE Core - Intermed exams.

Generics are covered in a specific sub-category, but questions in other categories can also use generics which is considered as a core feature, used in the signature of many methods of the API.

  Released  Beta  Frozen  

Interfaces  2 questions

Write code that uses the Collections interfaces (Collection, Set, List, Queue, Map, SortedSet and SortedMap)
  • including their bulk operation methods and array operation methods, such as containsAll(), addAll(), retainAll(), toArray(), etc.
105 238 122

Implementation

 
 

General-purpose Implementations  3 questions

Write code that use the classic implementation of Collections.
  • Set interface : HashSet, TreeSet, LinkedHashSet
  • List interface : ArrayList, LinkedList, Vector
  • Map interface : HashMap, TreeMap, LinkedHashMap, Hashtable
  • Queue interface : PriorityQueue
78 780 178

Special-purpose Implementations  2 questions

Identify cases where the usage of these classes is appropriate, and write code that use them.
  • Set interface : EnumSet, CopyOnWriteArraySet
  • List interface : CopyOnWriteArrayList
  • Map interface : EnumMap, WeakHashMap, IdentityHashMap
18 10 86

Wrapper Implementations  2 questions

Produce wrapper implementations from the Collections class, and identify their behaviours: synchronization wrappers, unmodifiable wrappers and checked wrappers.
7 0 35

Convenience Implementations  2 questions

Write code that use the following methods appropriately: Arrays.asList, Collections.nCopies, Collections.singleton.. and Collections.empty..
23 0 64

Custom Collection Implementations  2 questions

Identify abstract collection classes, and extend them to create custom collection classes: AbstractCollection, AbstractList, AbstractSet, AbstractSequentialList, AbstractQueue, AbstractMap.
2 0 23

Ordering  2 questions

Sort collections and arrays (natural and non natural orders) using the sort method of the classes Collections and Arrays.
Implement the Comparable and Comparator interfaces to customize sorting.
Identify cases when a ClassCastException is thrown during sorting.

Develop code using Collections.binarySearch, Arrays.binarySearch. Develop code using the finding and ordering methods from the Collections class: min, max, reverse, reverseOrder, rotate, shuffle and swap.
39 7 121

Misc Manipulations

Collections class, Arrays class and bit twiddling.
 
 

Collections class  1 question

Write code that makes appropriate use of these Collections class methods: addAll, copy, disjoint, enumeration, fill, frequency, indexOfSubList, lastIndexOfSubList, List and replaceAll.

Methods not covered here: binarySearch, min, max, reverse, rotate, shuffle, sort, swap (Ordering category), empty.., nCopies, singleton.. (Convenience Implementations category).
This category also excludes the synchronization, unmodifiable and checked wrappers (Wrapper Implementation).
22 59 58

Arrays class  1 question

Write code that makes appropriate use of the Arrays class methods containing the words equals, hashCode, fill and toString.

Methods not covered here: asList (Convenience Implementations category), sort and binarySearch (Ordering category).
19 0 43

Bit Twiddling  1 question

Use the bit manipulation methods (that start with reverse, rotate and bitCount), from the Long and Integer classes.

Not covered: other methods of the Long and Integer classes.
1 0 24

Exam information

  • 27 minutes
  • 18 questions (2162)
  • 80% required
  • +3 √
  • - 12  points
  • 15 day delay
  • status: released

Top contributors