Рет қаралды 26,703
Source Code:thecodingsimplified.com/sort-...
- We sort the object array using Comparable or Comparator
- If you're implementing Comparable interface then override the compareTo method
- If you're implementing Comparator interface then override the compare method
- Use comparable if you're sure if you'll always sort via a particular variable
- Use comparator, if you want to be flexible on Run time Sorting strategy
CHECK OUT CODING SIMPLIFIED
/ codingsimplified
★☆★ VIEW THE BLOG POST: ★☆★
thecodingsimplified.com
I started my KZfaq channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 400+ videos.
★☆★ SUBSCRIBE TO ME ON KZfaq: ★☆★
kzfaq.info...
★☆★ Send us mail at: ★☆★
Email: thecodingsimplified@gmail.com