Comparator is an Interface in java which is present in java.util package. Comparator interface has only method comapare which has two argument. 1 2 3 4 5 6 7 … Continue reading "Comparator in java with Example"
Category: Collection Framework
How to sort User define object ? Let’s say we have Employee Object and we want sort based on Employee id Then we have to use Comparable Interface of java.util… Continue reading "Sorting ArrayList element using Comparable"