SKILL BENCHMARK

Java Collections Literacy (Beginner Level)

  • 13m
  • 13 questions
The Java Collections Literacy (Beginner Level) benchmark measures your ability to instantiate ArrayLists, contrast their strengths with the limitations of arrays, iterate over their elements in various ways, enumerate interfaces implemented by lists, and modify list elements. A learner who scores high on this benchmark demonstrates they have the skills to work with ArrayList and List in Java and perform operations.

Topics covered

  • describe how an ArrayList is ordered and allows duplicates
  • describe how lists can be instantiated with type parameters to achieve type safety
  • describe how the .get, .set, .add, .indexof, and .lastindexof methods work
  • describe how the .hasnext, .next, .previous, and .hasprevious methods can be used to iterate over lists in different ways
  • describe how you can iterate over lists using ListIterator
  • describe important methods of the List interface and how the .addall, .removeall, and .retainall methods work
  • describes the is-a relationship of an ArrayList with Collection, Iterable, and List
  • describe the ArrayList, LinkedList, and Vector classes and how these are all instances of the list, collection, and iterable interfaces
  • describe the two limitations of an array
  • describe when you can use the .sublist method to get a part of a list
  • recognize how the .get method can be used to access individual elements of a list
  • recognize how the Iterable and Iterator interfaces can be accessed using loops to avoid run-time errors from going over the limits of a list
  • recognize the individual methods from the collection interface