Sorting arrays using Comparator

This post explains how to sort arrays using comparator with an example. The java jdk provides Arrays class, which has a static method named “sort”. This method takes two arguments 1) the array to be sorted 2) Comparator which contains the logic to sort the array Below is the example which sort cards based on…… Continue reading Sorting arrays using Comparator