Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.


Show the video description

In this video we will learn, how to sort a string array and an ArrayList of custom objects alphabetically. For this we will use the Array.sort method and the Collections.sort method. For the latter we will build our own Comparator and override it’s compare method.