• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sorting two calendar years

 
Amrita Datta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to sort an array list based on two different calendar years.
The information that we get in the current calendar year shoud be displayed first followed by the previous calendar year.

Am unable to sort the information based on the 2 calendar years.

 
Rob Spoor
Sheriff
Pie
Posts: 20546
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is in the list?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34668
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One place to start is the Comparator class. It lets you define a specific sort order as being different from the default.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic