Sorting Lists Using Comparators: Java Collections Framework Video Tutorial, Part 7

A tutorial on sorting ArrayLists and other lists using the Comparator interface. In this tutorial you’ll learn how to sort your Java lists in an arbitrary order. After starting the video, click the maximise button to make it fullscreen so … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |

Using Custom Objects in Sets and as Map Keys: Java Collections Framework Video Tutorial, Part 6

A tutorial on using your own objects as keys in Maps or in Sets. To use your own objects as keys in Maps or in Sets you need to tell Java how to compare your objects, by implementing the hashCode() … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |

HashSet and Sets: Java Collections Framework Video Tutorial, Part 5

A tutorial on sets in Java; in this tutorial I show you how to use HashSet, TreeSet and LinkedHashSet, plus how to use the Set interface methods and how to do stuff like finding the intersection of two sets. After … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , , , |

Sorted Maps: Java Collections Framework Video Tutorial, Part 4

A tutorial on sorted maps in Java, plus some explanation of the Map interface and interfaces in general. After starting the video, click the maximise button to make it fullscreen so you can see the code! Code For This Tutorial … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , , |

HashMap: Java Collections Framework Video Tutorial, Part 3

A tutorial on HashMap. Maps are data collections that function like lookup tables; basically you can store objects via “keys” (names, IDs, or even complex objects) and quickly retrieve them without having to look through an entire list. After starting … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |